History log of /llvm-project/clang/test/SemaCXX/cxx1y-variable-templates_top_level.cpp (Results 1 – 25 of 26)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0
# aa7ce605 27-Aug-2022 Shafik Yaghmour <shafik.yaghmour@intel.com>

[Clang] Avoid crashes when parsing using enum declarations

In Parser::ParseUsingDeclaration(...) when we call ParseEnumSpecifier(...) it is
not calling SetTypeSpecError() on DS when it detects an er

[Clang] Avoid crashes when parsing using enum declarations

In Parser::ParseUsingDeclaration(...) when we call ParseEnumSpecifier(...) it is
not calling SetTypeSpecError() on DS when it detects an error. That means that
DS is left set to TST_unspecified. When we then pass DS into
Sema::ActOnUsingEnumDeclaration(...) we hit an llvm_unreachable(...) since it
expects it to be one of three states TST_error, TST_enum or TST_typename.

This fixes https://github.com/llvm/llvm-project/issues/57347

Differential Revision: https://reviews.llvm.org/D132695

show more ...


Revision tags: llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4
# 2cb2cd24 04-May-2022 Aaron Ballman <aaron@aaronballman.com>

Change the behavior of implicit int diagnostics

C89 allowed a type specifier to be elided with the resulting type being
int, aka implicit int behavior. This feature was subsequently removed
in C99 w

Change the behavior of implicit int diagnostics

C89 allowed a type specifier to be elided with the resulting type being
int, aka implicit int behavior. This feature was subsequently removed
in C99 without a deprecation period, so implementations continued to
support the feature. Now, as with implicit function declarations, is a
good time to reevaluate the need for this support.

This patch allows -Wimplicit-int to issue warnings in C89 mode (off by
default), defaults the warning to an error in C99 through C17, and
disables support for the feature entirely in C2x. It also removes a
warning about missing declaration specifiers that really was just an
implicit int warning in disguise and other minor related cleanups.

show more ...


Revision tags: llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1, llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2, llvmorg-10.0.1-rc1, llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3, llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1, llvmorg-11-init, llvmorg-9.0.1, llvmorg-9.0.1-rc3, llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1, llvmorg-9.0.0, llvmorg-9.0.0-rc6, llvmorg-9.0.0-rc5, llvmorg-9.0.0-rc4, llvmorg-9.0.0-rc3, llvmorg-9.0.0-rc2, llvmorg-9.0.0-rc1, llvmorg-10-init, llvmorg-8.0.1, llvmorg-8.0.1-rc4, llvmorg-8.0.1-rc3, llvmorg-8.0.1-rc2, llvmorg-8.0.1-rc1, llvmorg-8.0.0, llvmorg-8.0.0-rc5, llvmorg-8.0.0-rc4, llvmorg-8.0.0-rc3, llvmorg-7.1.0, llvmorg-7.1.0-rc1, llvmorg-8.0.0-rc2, llvmorg-8.0.0-rc1, llvmorg-7.0.1, llvmorg-7.0.1-rc3, llvmorg-7.0.1-rc2, llvmorg-7.0.1-rc1, llvmorg-7.0.0, llvmorg-7.0.0-rc3, llvmorg-7.0.0-rc2, llvmorg-7.0.0-rc1, llvmorg-6.0.1, llvmorg-6.0.1-rc3, llvmorg-6.0.1-rc2
# ecad88d2 26-Apr-2018 Richard Smith <richard-llvm@metafoo.co.uk>

Factor out common code for diagnosing missing template arguments.

In passing, add 'concept' to the list of template kinds in diagnostics.

llvm-svn: 330890


Revision tags: llvmorg-6.0.1-rc1, llvmorg-5.0.2, llvmorg-5.0.2-rc2, llvmorg-5.0.2-rc1
# c660c8f5 16-Mar-2018 Richard Smith <richard-llvm@metafoo.co.uk>

Implement C++ DR727, which permits explicit specializations at class scope.

More generally, this permits a template to be specialized in any scope in which
it could be defined, so this also supersed

Implement C++ DR727, which permits explicit specializations at class scope.

More generally, this permits a template to be specialized in any scope in which
it could be defined, so this also supersedes DR44 and DR374 (the latter of
which we previously only implemented in C++11 mode onwards due to unclarity as
to whether it was a DR).

llvm-svn: 327705

show more ...


Revision tags: llvmorg-6.0.0, llvmorg-6.0.0-rc3, llvmorg-6.0.0-rc2, llvmorg-6.0.0-rc1, llvmorg-5.0.1, llvmorg-5.0.1-rc3, llvmorg-5.0.1-rc2, llvmorg-5.0.1-rc1, llvmorg-5.0.0, llvmorg-5.0.0-rc5, llvmorg-5.0.0-rc4, llvmorg-5.0.0-rc3, llvmorg-5.0.0-rc2, llvmorg-5.0.0-rc1, llvmorg-4.0.1, llvmorg-4.0.1-rc3, llvmorg-4.0.1-rc2
# 42bc73a3 10-May-2017 Richard Smith <richard-llvm@metafoo.co.uk>

When we see a '<' operator, check whether it's a probable typo for a template-id.

The heuristic that we use here is:
* the left-hand side must be a simple identifier or a class member access
* the

When we see a '<' operator, check whether it's a probable typo for a template-id.

The heuristic that we use here is:
* the left-hand side must be a simple identifier or a class member access
* the right-hand side must be '<' followed by either a '>' or by a type-id that
cannot be an expression (in particular, not followed by '(' or '{')
* there is a '>' token matching the '<' token

The second condition guarantees the expression would otherwise be ill-formed.

If we're confident that the user intended the name before the '<' to be
interpreted as a template, diagnose the fact that we didn't interpret it
that way, rather than diagnosing that the template arguments are not valid
expressions.

llvm-svn: 302615

show more ...


Revision tags: llvmorg-4.0.1-rc1, llvmorg-4.0.0, llvmorg-4.0.0-rc4, llvmorg-4.0.0-rc3
# d69f4f5b 10-Feb-2017 Richard Smith <richard-llvm@metafoo.co.uk>

[c++1z] Require an initializer for deduced class template specialization types.

It's actually meaningful and useful to allow such variables to have no
initializer, but we are strictly following the

[c++1z] Require an initializer for deduced class template specialization types.

It's actually meaningful and useful to allow such variables to have no
initializer, but we are strictly following the standard here until the C++
committee reaches consensus on allowing this.

llvm-svn: 294785

show more ...


Revision tags: llvmorg-4.0.0-rc2, llvmorg-4.0.0-rc1
# f388f78b 10-Jan-2017 Richard Smith <richard-llvm@metafoo.co.uk>

Don't classify variable template names as type templates.

llvm-svn: 291528


Revision tags: llvmorg-3.9.1, llvmorg-3.9.1-rc3, llvmorg-3.9.1-rc2, llvmorg-3.9.1-rc1
# e4caa48d 31-Aug-2016 Richard Smith <richard-llvm@metafoo.co.uk>

DR259: Demote the pedantic error for an explicit instantiation after an
explicit specialization to a warning for C++98 mode (this is a defect report
resolution, so per our informal policy it should a

DR259: Demote the pedantic error for an explicit instantiation after an
explicit specialization to a warning for C++98 mode (this is a defect report
resolution, so per our informal policy it should apply in C++98), and turn
the warning on by default for C++11 and later. In all cases where it fires, the
right thing to do is to remove the pointless explicit instantiation.

llvm-svn: 280308

show more ...


Revision tags: llvmorg-3.9.0, llvmorg-3.9.0-rc3, llvmorg-3.9.0-rc2, llvmorg-3.9.0-rc1, llvmorg-3.8.1, llvmorg-3.8.1-rc1
# eeba9e40 26-May-2016 Olivier Goffart <ogoffart@woboq.com>

Fix crash while parsing variable template with variadic template arguments

It is only a crash if the compiler optimize for this!=nullptr because
LocalInstantiationScope::getPartiallySubstitutedPack

Fix crash while parsing variable template with variadic template arguments

It is only a crash if the compiler optimize for this!=nullptr because
LocalInstantiationScope::getPartiallySubstitutedPack checks if 'this' is null
(This is crashing when clang is compiled with GCC6)

Differential Revision: http://reviews.llvm.org/D20511

llvm-svn: 270845

show more ...


# 1a88adbb 14-Apr-2016 Charles Li <charles_li@playstation.sony.com>

Lit C++11 Compatibility Patch #8

24 tests have been updated for C++11 compatibility.

llvm-svn: 266387


Revision tags: llvmorg-3.8.0, llvmorg-3.8.0-rc3, llvmorg-3.8.0-rc2, llvmorg-3.8.0-rc1, llvmorg-3.7.1, llvmorg-3.7.1-rc2, llvmorg-3.7.1-rc1
# 5cd86f8c 03-Nov-2015 Richard Smith <richard-llvm@metafoo.co.uk>

[modules] Rationalize the behavior of Decl::declarationReplaces, and in
particular don't assume that two declarations of the same kind in the same
context are declaring the same entity. That's not tr

[modules] Rationalize the behavior of Decl::declarationReplaces, and in
particular don't assume that two declarations of the same kind in the same
context are declaring the same entity. That's not true when the same name is
declared multiple times as internal-linkage symbols within a module.
(getCanonicalDecl is cheap now, so we can just use it here.)

llvm-svn: 251898

show more ...


Revision tags: llvmorg-3.7.0, llvmorg-3.7.0-rc4, llvmorg-3.7.0-rc3, studio-1.4, llvmorg-3.7.0-rc2, llvmorg-3.7.0-rc1
# 38a50c0a 14-Jul-2015 David Majnemer <david.majnemer@gmail.com>

[Sema] Emit a better diagnostic when variable redeclarations disagree

We referred to all declaration in definitions in our diagnostic messages
which is can be inaccurate. Instead, classify the decl

[Sema] Emit a better diagnostic when variable redeclarations disagree

We referred to all declaration in definitions in our diagnostic messages
which is can be inaccurate. Instead, classify the declaration and emit
an appropriate diagnostic for the new declaration and an appropriate
note pointing to the old one.

This fixes PR24116.

llvm-svn: 242190

show more ...


Revision tags: llvmorg-3.6.2, llvmorg-3.6.2-rc1, llvmorg-3.6.1, llvmorg-3.6.1-rc1, llvmorg-3.5.2, llvmorg-3.5.2-rc1, llvmorg-3.6.0, llvmorg-3.6.0-rc4, llvmorg-3.6.0-rc3, llvmorg-3.6.0-rc2, llvmorg-3.6.0-rc1, llvmorg-3.5.1, llvmorg-3.5.1-rc2, llvmorg-3.5.1-rc1, llvmorg-3.5.0, llvmorg-3.5.0-rc4, llvmorg-3.5.0-rc3, llvmorg-3.5.0-rc2, llvmorg-3.5.0-rc1
# b0869036 17-May-2014 Alp Toker <alp@nuanti.com>

Tweak diagnostic wording for init list narrowing

The conventional form is '<action> to silence this warning'.

Also call the diagnostic an 'issue' rather than a 'message' because the latter
term is

Tweak diagnostic wording for init list narrowing

The conventional form is '<action> to silence this warning'.

Also call the diagnostic an 'issue' rather than a 'message' because the latter
term is more widely used with reference to message expressions.

llvm-svn: 209052

show more ...


Revision tags: llvmorg-3.4.2, llvmorg-3.4.2-rc1
# 967c13d3 08-May-2014 Karthik Bhat <kv.bhat@samsung.com>

Fix PR19169 [Crash on invalid attempting to specialize a template method as a template variable].
A template declaration of a template name can be null in case we have a dependent name or a set of fu

Fix PR19169 [Crash on invalid attempting to specialize a template method as a template variable].
A template declaration of a template name can be null in case we have a dependent name or a set of function templates.
Hence use dyn_cast_or_null instead of dyn_cast. Also improve the diagnostic emitted in this case.

llvm-svn: 208313

show more ...


Revision tags: llvmorg-3.4.1, llvmorg-3.4.1-rc2, llvmorg-3.4.1-rc1
# d292b24f 16-Mar-2014 Richard Smith <richard-llvm@metafoo.co.uk>

PR19152: If a variable template's type involves 'auto', instantiate the
initializer with the variable in order to determine the type.

llvm-svn: 204015


# 72db5632 25-Jan-2014 Richard Smith <richard-llvm@metafoo.co.uk>

PR18530: Don't assert when performing error recovery after a missing 'template<>' on a variable template explicit specialization.

llvm-svn: 200099


# beef3453 16-Jan-2014 Richard Smith <richard-llvm@metafoo.co.uk>

Clean up variable template handling a bit, and correct the behavior of name
lookup when declaring a variable template specialization.

llvm-svn: 199438


Revision tags: llvmorg-3.4.0, llvmorg-3.4.0-rc3
# f95fe9b8 04-Dec-2013 Richard Smith <richard-llvm@metafoo.co.uk>

Fix crash if a variable template specialization is used in a nested-name-specifier.

llvm-svn: 196335


# 72bfbd86 04-Dec-2013 Richard Smith <richard-llvm@metafoo.co.uk>

Fix several crash-on-invalids when using template-ids that aren't
simple-template-ids (eg, 'operator+<int>') in weird places.

llvm-svn: 196333


Revision tags: llvmorg-3.4.0-rc2, llvmorg-3.4.0-rc1
# 300e0c36 24-Sep-2013 Richard Smith <richard-llvm@metafoo.co.uk>

Implement restriction that a partial specialization must actually specialize
something, for variable templates.

llvm-svn: 191278


# ef985ac9 18-Sep-2013 Richard Smith <richard-llvm@metafoo.co.uk>

Fix accepts-invalid if a variable template explicit instantiation is missing an
argument list, but could be instantiated with argument list of <>.

llvm-svn: 190913


# 72caf2bb 22-Aug-2013 Larisse Voufo <lvoufo@google.com>

Refactor for clarity and simplicity.

llvm-svn: 188974


# dbd65779 14-Aug-2013 Larisse Voufo <lvoufo@google.com>

Bug fix: note diagnosis on expression narrowing should say "variable template" instead of "static data member" when appropriate

llvm-svn: 188409


# d8dd97c0 14-Aug-2013 Larisse Voufo <lvoufo@google.com>

Bug fix: disallow a variable template to be redeclared as a non-templated variable

llvm-svn: 188350


# a11bd8a7 13-Aug-2013 Larisse Voufo <lvoufo@google.com>

variable templates updated for PCH serialization... Still working on test cases...

llvm-svn: 188249


12