summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/temp
Commit message (Collapse)AuthorAgeFilesLines
...
* PR20073: promote "dereference of 'void*'" from Extension to ExtWarn.Richard Smith2015-05-191-1/+1
| | | | llvm-svn: 237652
* When emitting a dropped qualifier error, show which qualifiers are dropped.Richard Trieu2015-05-161-1/+1
| | | | llvm-svn: 237505
* Improve the error message for assigning to read-only variables.Richard Trieu2015-04-111-2/+2
| | | | | | | | | | Previously, many error messages would simply be "read-only variable is not assignable" This change provides more information about why the variable is not assignable, as well as note to where the const is located. Differential Revision: http://reviews.llvm.org/D4479 llvm-svn: 234677
* PR22435: Correctly implement tiebreaker for reference ordering in functionRichard Smith2015-02-201-1/+22
| | | | | | | template partial ordering rules. This rule applies per pair of types being compared, not per pair of function templates being compared. llvm-svn: 229965
* PR 17456Nathan Sidwell2015-01-281-1/+1
| | | | | | More helpful diagnostic on casts between unrelated class hierarchies. llvm-svn: 227371
* Update error message text.Serge Pavlov2015-01-181-1/+1
| | | | | | | | | 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
* PR21531: fix crash on invalid with unexpanded pack in case value.Richard Smith2014-11-201-0/+1
| | | | llvm-svn: 222400
* Handle use of default member initializers before end of outermost classReid Kleckner2014-11-171-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifically, when we have this situation: struct A { template <typename T> struct B { int m1 = sizeof(A); }; B<int> m2; }; We can't parse m1's initializer eagerly because we need A to be complete. Therefore we wait until the end of A's class scope to parse it. However, we can trigger instantiation of B before the end of A, which will attempt to instantiate the field decls eagerly, and it would build a bad field decl instantiation that said it had an initializer but actually lacked one. Fixed by deferring instantiation of default member initializers until they are needed during constructor analysis. This addresses a long standing FIXME in the code. Fixes PR19195. Reviewed By: rsmith Differential Revision: http://reviews.llvm.org/D5690 llvm-svn: 222192
* Towards PR21289: don't lose track of unexpanded parameter packs withRichard Smith2014-10-171-0/+14
| | | | | | | non-dependent types, in CXXScalarValueInitExprs and in the nested-name-specifier or template arguments of a DeclRefExpr in particular. llvm-svn: 220028
* Fix "unsupported friend" diagnostic to also appear for friend functions with ↵Richard Smith2014-09-291-4/+4
| | | | | | dependent scopes. llvm-svn: 218590
* C++1y is now C++14!Aaron Ballman2014-08-192-5/+5
| | | | | | Changes diagnostic options, language standard options, diagnostic identifiers, diagnostic wording to use c++14 instead of c++1y. It also modifies related test cases to use the updated diagnostic wording. llvm-svn: 215982
* Reject varargs '...' in function prototype if there are more parameters afterRichard Smith2014-08-111-1/+1
| | | | | | | | | | | it. Diagnose with recovery if it appears after a function parameter that was obviously supposed to be a parameter pack. Otherwise, warn if it immediately follows a function parameter pack, because the user most likely didn't intend to write a parameter pack followed by a C-style varargs ellipsis. This warning can be syntactically disabled by using ", ..." instead of "...". llvm-svn: 215408
* Revert "clang/test/Driver/crash-report.c: This requires rewriter for ↵Alp Toker2014-07-162-2/+0
| | | | | | | | | | | | | | | | | | | | | -frewrite-includes. [PR20321]" We've decided to make the core rewriter class and PP rewriters mandatory. They're only a few hundred lines of code in total and not worth supporting as a distinct build configuration, especially since doing so disables key compiler features. This reverts commit r213150. Revert "clang/test: Introduce the feature "rewriter" for --enable-clang-rewriter." This reverts commit r213148. Revert "Move clang/test/Frontend/rewrite-*.c to clang/test/Frontend/Rewriter/" This reverts commit r213146. llvm-svn: 213159
* clang/test: Introduce the feature "rewriter" for --enable-clang-rewriter.NAKAMURA Takumi2014-07-162-0/+2
| | | | llvm-svn: 213148
* Move DR532 test where it belongs.Nikola Smiljanic2014-06-031-16/+0
| | | | llvm-svn: 210064
* PR12961 - Extend DR532 to cover C++98/03.Nikola Smiljanic2014-05-312-63/+37
| | | | llvm-svn: 209955
* This test is no longer relevant. It is covered already by ↵Aaron Ballman2014-05-301-5/+0
| | | | | | [basic.scope.pdecl]p10, and our current test for that is more thorough (though our test is named p9.cpp). llvm-svn: 209892
* CodeGen: Fix linkage of reference temporariesDavid Majnemer2014-04-281-2/+2
| | | | | | | | | | | | | | | Summary: A reference temporary should inherit the linkage of the variable it initializes. Otherwise, we may hit cases where a reference temporary wouldn't have the same value in all translation units. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3515 llvm-svn: 207451
* Replace "can not" with "cannot" in diagnostics messages.Ismail Pazarbasi2014-03-073-4/+4
| | | | llvm-svn: 203302
* Improve diagnostic for using non-class/namespace/scoped enum in a nested ↵David Blaikie2014-02-091-1/+1
| | | | | | | | | | | | | | | name specifier. Rather than simply saying "X is not a class or namespace", clarify what X is by providing the aka type in the case where X is a type, or pointing to the named declaration if there's an unambiguous one to refer to. In the ambiguous case, the ambiguities are already enumerated (though could be clarified by describing what kind of entities they are) Included a few FIXMEs in tests where some further improvements could be made. llvm-svn: 201038
* Clean up variable template handling a bit, and correct the behavior of nameRichard Smith2014-01-162-4/+44
| | | | | | lookup when declaring a variable template specialization. llvm-svn: 199438
* PR18401: Fix assert by implementing the current proposed direction of coreRichard Smith2014-01-091-3/+12
| | | | | | | issue 1430. Don't allow a pack expansion to be used as an argument to an alias template unless the corresponding parameter is a parameter pack. llvm-svn: 198833
* Eliminate UnaryTypeTraitExprAlp Toker2014-01-011-1/+1
| | | | | | | | | | | | | Remove UnaryTypeTraitExpr and switch all remaining type trait related handling over to TypeTraitExpr. The UTT/BTT/TT enum prefix and evaluation code is retained pending further cleanup. This is part of the ongoing work to unify type traits following the removal of BinaryTypeTraitExpr in r197273. llvm-svn: 198271
* Revert "Don't require -re suffix on -verify directives with regexes."Alp Toker2013-12-141-1/+1
| | | | | | | | | | This patch was submitted to the list for review and didn't receive a LGTM. (In fact one explicit objection and one query were raised.) This reverts commit r197295. llvm-svn: 197299
* Don't require -re suffix on -verify directives with regexes.Hans Wennborg2013-12-141-1/+1
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D2392 llvm-svn: 197295
* Eliminate BinaryTypeTraitExprAlp Toker2013-12-131-1/+1
| | | | | | | | | | | | | | | | | There's nothing special about type traits accepting two arguments. This commit eliminates BinaryTypeTraitExpr and switches all related handling over to TypeTraitExpr. Also fixes a CodeGen failure with variadic type traits appearing in a non-constant expression. The BTT/TT prefix and evaluation code is retained as-is for now but will soon be further cleaned up. This is part of the ongoing work to unify type traits. llvm-svn: 197273
* Tighten test regexes checking for __attribute__((thiscall)) on function types.Hans Wennborg2013-12-131-1/+1
| | | | | | | | | | | The tests were perhaps made too relaxed in r197164 when we switched to the new MinGW ABI. This makes sure we check explicitly for an optional thiscall attribute and nothing else. We should still look into whether we should print these attributes at all in these cases. llvm-svn: 197252
* Switch to the new MingW ABI.Rafael Espindola2013-12-121-1/+1
| | | | | | | GCC 4.7 changed the MingW ABI. On the clang side this means that methods now have the thiscall calling convention by default. llvm-svn: 197164
* Give a more appropriate diagnostic when a template specialization orRichard Smith2013-12-073-4/+4
| | | | | | | instantiation appears in a non-enclosing namespace (the previous diagnostic talked about the C++98 rule even in C++11 mode). llvm-svn: 196642
* Implement DR482: namespace members can be redeclared with a qualified nameRichard Smith2013-12-051-1/+2
| | | | | | | | | | within their namespace, and such a redeclaration isn't required to be a definition any more. Update DR status page to say Clang 3.4 instead of SVN and add new Clang 3.5 category (but keep Clang 3.4 yellow for now). llvm-svn: 196481
* Sema: Instantiate local class and their members appropriatelyDavid Majnemer2013-11-271-6/+5
| | | | | | | | | | | We would fail to instantiate them when the surrounding function was instantiated. Instantiate the class and add it's members to the list of pending instantiations, they should be resolved when we are finished with the function's body. This fixes PR9685. llvm-svn: 195827
* Issue a diagnostic if we see a templated friend declaration that we do notRichard Smith2013-11-081-3/+3
| | | | | | support. llvm-svn: 194273
* Sema: Emit a nicer diagnostic when IndirectFieldDecls show up ↵David Majnemer2013-10-261-1/+3
| | | | | | inappropriately in non-type template arguments llvm-svn: 193462
* Sema: Do not allow template declarations inside local classesDavid Majnemer2013-10-221-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Enforce the rule in C++11 [temp.mem]p2 that local classes cannot have member templates. This fixes PR16947. N.B. C++14 has slightly different wording to afford generic lambdas declared inside of functions. Fun fact: Some formulations of local classes with member templates would cause clang to crash during Itanium mangling, such as the following: void outer_mem() { struct Inner { template <typename = void> struct InnerTemplateClass { static void itc_mem() {} }; }; Inner::InnerTemplateClass<>::itc_mem(); } Reviewers: eli.friedman, rsmith, doug.gregor, faisalv Reviewed By: doug.gregor CC: cfe-commits, ygao Differential Revision: http://llvm-reviews.chandlerc.com/D1866 llvm-svn: 193144
* Allow CorrectTypo to replace CXXScopeSpecifiers that refer to classes.Kaelyn Uhrain2013-10-191-3/+3
| | | | | | | | | | | Now that CorrectTypo knows how to correctly search classes for typo correction candidates, there is no good reason to only replace an existing CXXScopeSpecifier if it refers to a namespace. While the actual enablement was a matter of changing a single comparison, the fallout from enabling the functionality required a lot more code changes (including my two previous commits). llvm-svn: 193020
* PR17592: Ensure we diagnose shadowing a template parameter with a local externRichard Smith2013-10-161-0/+69
| | | | | | declaration. llvm-svn: 192846
* Hopefully unbreak bots which are seeing an assert in this test. Temporary, realRichard Smith2013-09-241-1/+7
| | | | | | | fix to come once I've tracked down the problem (which is pre-existing and not related to the change which introduced this test). llvm-svn: 191279
* Implement restriction that a partial specialization must actually specializeRichard Smith2013-09-241-0/+29
| | | | | | something, for variable templates. llvm-svn: 191278
* Fix accepts-invalid if a variable template explicit instantiation is missing anRichard Smith2013-09-181-1/+1
| | | | | | argument list, but could be instantiated with argument list of <>. llvm-svn: 190913
* PR17075: When performing partial ordering of a member function against aRichard Smith2013-09-111-0/+7
| | | | | | | | | | | non-member function, the number of arguments in the two candidate calls will be different (the non-member call will have one extra argument). We used to get confused by this, and fail to compare the last argument when testing whether the member is better, resulting in us always thinking it is, even if the non-member is more specialized in the last argument. llvm-svn: 190470
* Disable llvm optimizations, but keep -O1 to test available_externally.Rafael Espindola2013-09-041-1/+1
| | | | llvm-svn: 189919
* Bug fix: disallow a variable template to be redeclared as a non-templated ↵Larisse Voufo2013-08-142-3/+2
| | | | | | variable llvm-svn: 188350
* Started implementing variable templates. Top level declarations should be ↵Larisse Voufo2013-08-063-2/+40
| | | | | | fully supported, up to some limitations documented as FIXMEs or TODO. Static data member templates work very partially. Static data member templates of class templates need particular attention... llvm-svn: 187762
* Regression test for PR12699Serge Pavlov2013-08-051-0/+26
| | | | llvm-svn: 187734
* Reinstate r186040, with additional fixes and more test coverage (reverted inRichard Smith2013-07-171-0/+17
| | | | | | | | | | | | | r186331). Original commit log: If we friend a declaration twice, that should not make it visible to name lookup in the surrounding context. Slightly rework how we handle friend declarations to inherit the visibility of the prior declaration, rather than setting a friend declaration to be visible whenever there was a prior declaration. llvm-svn: 186546
* Re-revert r86040, which was un-reverted in r186199.Chandler Carruth2013-07-151-17/+0
| | | | | | | | | | | | | | | This breaks the build of basic patterns with repeated friend declarations. See the added test case in SemaCXX/friend.cpp or the test case reported to the original commit log. Original commit log: If we friend a declaration twice, that should not make it visible to name lookup in the surrounding context. Slightly rework how we handle friend declarations to inherit the visibility of the prior declaration, rather than setting a friend declaration to be visible whenever there was a prior declaration. llvm-svn: 186331
* Fix to PR12262 - assertion when substituting explicit template argumentsSerge Pavlov2013-07-151-0/+177
| | | | | | | | does not substitute a sizeof-pack expression. The solution is proposed by Richard Smith. Differential Revision: http://llvm-reviews.chandlerc.com/D869 llvm-svn: 186306
* Correctly classify pack expansions as NON_CANONICAL_UNLESS_DEPENDENTDavid Blaikie2013-07-131-0/+4
| | | | | | | | | | | Test coverage for non-dependent pack expansions doesn't demonstrate a failure prior to this patch (a follow-up commit improving debug info will cover this commit specifically) but covers a related hole in our test coverage. Reviewed by Richard Smith & Eli Friedman. llvm-svn: 186261
* Unrevert r186040, reverted in r186185, with fix for PR16597.Richard Smith2013-07-121-0/+17
| | | | | | | | | | | Original commit log: If we friend a declaration twice, that should not make it visible to name lookup in the surrounding context. Slightly rework how we handle friend declarations to inherit the visibility of the prior declaration, rather than setting a friend declaration to be visible whenever there was a prior declaration. llvm-svn: 186199
* Revert r186040 to fix PR16597 while Richard investigates what the bestChandler Carruth2013-07-121-17/+0
| | | | | | | | | | | | | fix is. Original commit log: If we friend a declaration twice, that should not make it visible to name lookup in the surrounding context. Slightly rework how we handle friend declarations to inherit the visibility of the prior declaration, rather than setting a friend declaration to be visible whenever there was a prior declaration. llvm-svn: 186185
OpenPOWER on IntegriCloud