summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/expr/expr.prim/expr.prim.general
Commit message (Collapse)AuthorAgeFilesLines
* Update error message text.Serge Pavlov2015-01-181-2/+2
| | | | | | | | | Previously if an enumeration was used in a nested name specifier in pre-C++11 language dialect, error message was 'XXX is not a class, namespace, or scoped enumeration'. This patch removes the word 'scoped' as in C++11 any enumeration may be used in this context. llvm-svn: 226410
* PR21437, final part of DR1330: delay-parsing of exception-specifications. ThisRichard Smith2014-11-131-3/+2
| | | | | | | is a re-commit of Doug's r154844 (modernized and updated to fit into current Clang). llvm-svn: 221918
* Don't allow 'this' within typedefs within classes that otherwise look like theyRichard Smith2014-01-171-0/+2
| | | | | | might be member function declarations. Patch by Harald van Dijk! llvm-svn: 199512
* PR16243: Use CXXThisOverride during template instantiation, and fix up theRichard Smith2013-06-071-2/+30
| | | | | | | | places which weren't setting it up properly. This allows us to get the right cv-qualifiers for 'this' when it appears outside a method body in a class template. llvm-svn: 183483
* <rdar://problem/13473493> Handle 'this->' insertion recovery within trailing ↵Douglas Gregor2013-03-261-0/+20
| | | | | | return types. llvm-svn: 178081
* PR15290: 'this' is not permitted in the declaration of a friend function,Richard Smith2013-03-151-0/+17
| | | | | | | therefore references to members should not be transformed into implicit uses of 'this'. Patch by Ismail Pazarbasi! llvm-svn: 177134
* Fix directive parsing in VerifyDiagnosticConsumer so that it ensures that ↵Andy Gibbs2012-10-191-2/+2
| | | | | | | | "expected" is at the start of the word and will no longer accept typos such as "junkexpected-*" as a valid "expected-*" directive. A very few test-cases had to be amended to adhere to the new rule. Patch reviewed by David Blaikie. llvm-svn: 166279
* Disable our non-standard delayed parsing of exception specifications. DelayingRichard Smith2012-05-021-2/+3
| | | | | | | the parsing of such things appears to be a conforming extension, but it breaks libstdc++4.7's std::pair. llvm-svn: 155975
* Implement the last part of C++ [class.mem]p2, delaying the parsing ofDouglas Gregor2012-04-161-0/+10
| | | | | | | | | exception specifications on member functions until after the closing '}' for the containing class. This allows, for example, a member function to throw an instance of its own class. Fixes PR12564 and a fairly embarassing oversight in our C++98/03 support. llvm-svn: 154844
* Implement C++11 [expr.prim.general]p3, which permits the use of 'this'Douglas Gregor2012-04-161-0/+90
| | | | | | | | | | | | | | | | | | | | | | | in the declaration of a non-static member function after the (optional) cv-qualifier-seq, which in practice means in the exception specification and late-specified return type. The new scheme here used to manage 'this' outside of a member function scope is more general than the Scope-based mechanism previously used for non-static data member initializers and late-parsesd attributes, because it can also handle the cv-qualifiers on the member function. Note, however, that a separate pass is required for static member functions to determine whether 'this' was used, because we might not know that we have a static function until after declaration matching. Finally, this introduces name mangling for 'this' and for the implicit 'this', which is intended to match GCC's mangling. Independent verification for the new mangling test case would be appreciated. Fixes PR10036 and PR12450. llvm-svn: 154799
* Improve diagnostics for invalid use of non-static members / this:Richard Smith2012-04-052-3/+3
| | | | | | | | | | | | * s/nonstatic/non-static/ in the diagnostics, since the latter form outvoted the former by 28-2 in our diagnostics. * Fix the "use of member in static member function" diagnostic to correctly detect this situation inside a block or lambda. * Produce a more specific "invalid use of non-static member" diagnostic for the case where a nested class member refers to a member of a lexically-surrounding class. llvm-svn: 154073
* PR11956: C++11's special exception for accessing non-static data members fromRichard Smith2012-02-251-1/+9
| | | | | | unevaluated operands applies within member functions, too. llvm-svn: 151443
* In the conflict between C++11 [expr.prim.general]p4, which declaresDouglas Gregor2012-02-211-0/+11
| | | | | | | | | | | that 'this' can be used in the brace-or-equal-initializer of a non-static data member, and C++11 [expr.prim.lambda]p9, which says that lambda expressions not in block scope can have no captures, side fully with C++11 [expr.prim.general]p4 by allowing 'this' to be captured within these initializers. This seems to be the intent of non-static data member initializers. llvm-svn: 151101
* Remove PotentiallyPotentiallyEvaluated, and replace it with a much simpler ↵Eli Friedman2012-01-201-0/+1
| | | | | | and less error-prone way of handling the relevant cases. Towards marking of whether a declaration is used more accurately. llvm-svn: 148522
* Make PotentiallyPotentiallyEvaluated contexts work correctly when ↵Eli Friedman2012-01-181-0/+8
| | | | | | referencing a class field from outside an instance method. llvm-svn: 148376
* Unlike in C++03, a constant-expression is not an unevaluated operand in C++11.Richard Smith2011-12-201-0/+9
| | | | | | | | | | | | | | | | | | | | | | Split out a new ExpressionEvaluationContext flag for this case, and don't treat it as unevaluated in C++11. This fixes some crash-on-invalids where we would allow references to class members in potentially-evaluated constant expressions in static member functions, and also fixes half of PR10177. The fix to PR10177 exposed a case where template instantiation failed to provide a source location for a diagnostic, so TreeTransform has been tweaked to supply source locations when transforming a type. The source location is still not very good, but MarkDeclarationsReferencedInType would need to operate on a TypeLoc to improve it further. Also fix MarkDeclarationReferenced in C++98 mode to trigger instantiation for static data members of class templates which are used in constant expressions. This fixes a link-time problem, but we still incorrectly treat the member as non-constant. The rest of the fix for that issue is blocked on PCH support for early-instantiated static data members, which will be added in a subsequent patch. llvm-svn: 146955
* Disallow decltype in qualified declarator-ids.David Blaikie2011-12-131-4/+0
| | | | llvm-svn: 146480
* Support decltype in nested-name-specifiers.David Blaikie2011-12-042-2/+83
| | | | llvm-svn: 145785
* Move tests to the appropriate directory to match the spec hierarchy.David Blaikie2011-11-072-0/+22
llvm-svn: 143906
OpenPOWER on IntegriCloud