ef8225444452a1486bd721f3285301fe84643b00 |
21-Jul-2014 |
Stephen Hines <srhines@google.com> |
Update Clang for rebase to r212749. This also fixes a small issue with arm_neon.h not being generated always. Includes a cherry-pick of: r213450 - fixes mac-specific header issue r213126 - removes a default -Bsymbolic on Android Change-Id: I2a790a0f5d3b2aab11de596fc3a74e7cbc99081d
emp.fct/temp.func.order/p3-0x.cpp
emp.fct/temp.func.order/p3.cpp
|
651f13cea278ec967336033dd032faef0e9fc2ec |
24-Apr-2014 |
Stephen Hines <srhines@google.com> |
Updated to Clang 3.5a. Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
emp.class.spec/p8-1y.cpp
emp.mem/p3.cpp
emp.variadic/fixed-expansion.cpp
emp.variadic/p5.cpp
|
ce6426feda94ca716ee7743b71961850740eb08d |
08-Nov-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Issue a diagnostic if we see a templated friend declaration that we do not support. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194273 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p5.cpp
|
588a51a471b4cb23613e8183e05d2d193d2ab813 |
22-Oct-2013 |
David Majnemer <david.majnemer@gmail.com> |
Sema: Do not allow template declarations inside local classes 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193144 91177308-0d34-0410-b5e6-96231b3b80d8
emp.mem/p2.cpp
|
b5c7768a74936d4e2c7a484570a638cb74702d8b |
19-Oct-2013 |
Kaelyn Uhrain <rikka@google.com> |
Allow CorrectTypo to replace CXXScopeSpecifiers that refer to classes. 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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193020 91177308-0d34-0410-b5e6-96231b3b80d8
emp.class/temp.mem.enum/p1.cpp
|
0302214d4a10ed328b1ec2de932f112881e9c217 |
24-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Hopefully unbreak bots which are seeing an assert in this test. Temporary, real fix to come once I've tracked down the problem (which is pre-existing and not related to the change which introduced this test). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191279 91177308-0d34-0410-b5e6-96231b3b80d8
emp.class.spec/p8-1y.cpp
|
ecbce69e354c77bf2d359111bad0c77c516e16f0 |
24-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement restriction that a partial specialization must actually specialize something, for variable templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191278 91177308-0d34-0410-b5e6-96231b3b80d8
emp.class.spec/p8-1y.cpp
|
66118c215183dec714cbbdec8060497675cebcac |
11-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR17075: When performing partial ordering of a member function against a 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190470 91177308-0d34-0410-b5e6-96231b3b80d8
emp.fct/temp.func.order/p3-0x.cpp
|
ef4579cda09b73e3d4d98af48201da25adc29326 |
06-Aug-2013 |
Larisse Voufo <lvoufo@google.com> |
Started implementing variable templates. Top level declarations should be 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... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187762 91177308-0d34-0410-b5e6-96231b3b80d8
emp.class/temp.static/p1.cpp
|
3cb443636fb3ca457994d91527a22c5b159e5169 |
05-Aug-2013 |
Serge Pavlov <sepavloff@gmail.com> |
Regression test for PR12699 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187734 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/sizeofpack.cpp
|
22050f25e34ba0cd21ee2dc3d765951c48e27cde |
18-Jul-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Reinstate r186040, with additional fixes and more test coverage (reverted in 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186546 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p4.cpp
|
52c2575fc77a51f36129be89d1a0a90e31617a57 |
15-Jul-2013 |
Chandler Carruth <chandlerc@gmail.com> |
Re-revert r86040, which was un-reverted in r186199. 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186331 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p4.cpp
|
dc49d523db70a1c9005b7c09de80b22ccb1ed6a4 |
15-Jul-2013 |
Serge Pavlov <sepavloff@gmail.com> |
Fix to PR12262 - assertion when substituting explicit template arguments does not substitute a sizeof-pack expression. The solution is proposed by Richard Smith. Differential Revision: http://llvm-reviews.chandlerc.com/D869 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186306 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/sizeofpack.cpp
|
226399ce18cdcbb1e83af7c5e644bdabb9d4f2f8 |
13-Jul-2013 |
David Blaikie <dblaikie@gmail.com> |
Correctly classify pack expansions as NON_CANONICAL_UNLESS_DEPENDENT 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186261 91177308-0d34-0410-b5e6-96231b3b80d8
emp.alias/p3.cpp
|
f9e65a274d4e5c5a45503efc81da43be76503983 |
12-Jul-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Unrevert r186040, reverted in r186185, with fix for PR16597. 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186199 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p4.cpp
|
1afa611e36e0ab23dd3cde4bbe5aa74ceb7d77c5 |
12-Jul-2013 |
Chandler Carruth <chandlerc@gmail.com> |
Revert r186040 to fix PR16597 while Richard investigates what the best 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186185 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p4.cpp
|
433a13d0cdb1c48b828fe5bfb6a835c58e1e758b |
11-Jul-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186040 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p4.cpp
|
ba5da6e7774b175a961b8e02c246f5272cf07125 |
26-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Missing test update from r184884. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184885 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p5.cpp
|
35178dc09d97bb2e0612813def09833866e3ad82 |
22-Jun-2013 |
David Blaikie <dblaikie@gmail.com> |
DebugInfo: Support (using GNU extensions) for template template parameters and parameter packs git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184644 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p2.cpp
|
8ff7e32f9480bf00d8d8476c650907853d1cc354 |
21-Jun-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Add a couple more tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184501 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p5.cpp
|
98a75581e155a7dac853a69b0151960f8e2aacbd |
13-Jun-2013 |
Nick Lewycky <nicholas@mxc.ca> |
Include the unexpanded packs in the initializer expression when checking a pack expanded constructor initializer list. Fixes PR16303! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183878 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p5.cpp
|
840462670ba7a6bc26265a2306b35f2f0f01f51c |
21-Apr-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
The 'constexpr implies const' rule for non-static member functions is gone in C++1y, so stop adding the 'const' there. Provide a compatibility warning for code relying on this in C++11, with a fix-it hint. Update our lazily-written tests to add the const, except for those ones which were testing our implementation of this rule. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179969 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/multi-level-substitution.cpp
|
419563768ef4929a622d7c2b066856e82901bb91 |
14-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Refactor to call ActOnFinishFullExpr on every full expression. Teach ActOnFinishFullExpr that some of its checks only apply to discarded-value expressions. This adds missing checks for unexpanded variadic template parameter packs to a handful of constructs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172485 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p5.cpp
emp.variadic/p5.mm
|
8e8fb3be5bd78f0564444eca02b404566a5f3b5d |
19-Oct-2012 |
Andy Gibbs <andyg1001@hotmail.co.uk> |
Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166280 91177308-0d34-0410-b5e6-96231b3b80d8
emp.alias/p1.cpp
emp.class.spec/p9.cpp
emp.class.spec/temp.class.order/p2.cpp
emp.class.spec/temp.class.spec.mfunc/p1.cpp
emp.class/temp.mem.func/p1-retmem.cpp
emp.class/temp.mem.func/pr5056.cpp
emp.fct/temp.func.order/p3-0x.cpp
emp.fct/temp.func.order/p3.cpp
emp.fct/temp.func.order/p5.cpp
emp.fct/temp.over.link/p4.cpp
emp.friend/p5.cpp
emp.mem/p1.cpp
emp.variadic/deduction.cpp
emp.variadic/example-bind.cpp
emp.variadic/example-function.cpp
emp.variadic/example-tuple.cpp
emp.variadic/injected-class-name.cpp
emp.variadic/partial-ordering.cpp
|
407c8470d50be8edaae7ed39a3139adf35af2921 |
20-Sep-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Fix a small FIXME involving template partial ordering and member function templates with an rvalue ref qualifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164267 91177308-0d34-0410-b5e6-96231b3b80d8
emp.fct/temp.func.order/p3-0x.cpp
|
9cef0064da0fe93cf60cc351d28ddf2e95fba0b3 |
20-Sep-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Fix function template partial ordering rules for static vs. non-static functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164263 91177308-0d34-0410-b5e6-96231b3b80d8
emp.fct/temp.func.order/p3-0x.cpp
emp.fct/temp.func.order/p3.cpp
|
9a4db032ecd991626d236a502e770126db32bd31 |
12-Sep-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR13811: Add a FunctionParmPackExpr node to handle references to function parameter packs where the reference is not being expanded but the pack has been. Previously, Clang would segfault in such cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163672 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/multi-level-substitution.cpp
|
1f2e1a96bec2ba6418ae7f2d2b525a3575203b6a |
10-Aug-2012 |
John McCall <rjmccall@apple.com> |
Check access to friend declarations. There's a number of different things going on here that were problematic: - We were missing the actual access check, or rather, it was suppressed on account of being a redeclaration lookup. - The access check would naturally happen during delay, which isn't appropriate in this case. - We weren't actually emitting dependent diagnostics associated with class templates, which was unfortunate. - Access was being propagated incorrectly for friend method declarations that couldn't be matched at parse-time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161652 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p1.cpp
|
500d729e85028944355a119f9823ac99fa5ddcab |
18-Jul-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR13386: When matching up parameters between a function template declaration and a function template instantiation, if there's a parameter pack in the declaration and one at the same place in the instantiation, don't assume that the pack wasn't expanded -- it may have expanded to nothing. Instead, go ahead and check whether the parameter pack was expandable. We can do this as a side-effect of the work we'd need to do anyway, to find how many parameters were produced. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160416 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/multi-level-substitution.cpp
|
74e2fc332e07c76d4e69ccbd0e9e47a0bafd3908 |
16-Apr-2012 |
Douglas Gregor <dgregor@apple.com> |
Implement the last part of C++ [class.mem]p2, delaying the parsing of 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154844 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p5.cpp
|
1af83c444e5a2f6f50a6e1c15e6ebc618ae18a5f |
23-Mar-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Support for definitions of member enumerations of class templates outside the class template's definition, and for explicit specializations of such enum members. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153304 91177308-0d34-0410-b5e6-96231b3b80d8
emp.class/temp.mem.enum/p1.cpp
|
7c5d28b6342229fb648aea59dc063f67ff16bc81 |
13-Mar-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR11850 + duplicates: don't assume that a function parameter pack expansion is at the end of the parameter list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152618 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p4.cpp
|
e9ee382c32a83e9807a2fe4cfd52b5a11169a4b8 |
22-Feb-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Improve diagnostics a bit for bad member initializers, and fix an obscure bug involving packs. Fixes PR12049. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151130 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p4.cpp
|
5b9cc5df25c2198f270dd1d5c438fdce70d4051d |
12-Feb-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Represent C++ direct initializers as ParenListExprs before semantic analysis instead of having a special-purpose function. - ActOnCXXDirectInitializer, which was mostly duplication of AddInitializerToDecl (leading e.g. to PR10620, which Eli fixed a few days ago), is dropped completely. - MultiInitializer, which was an ugly hack I added, is dropped again. - We now have the infrastructure in place to distinguish between int x = {1}; int x({1}); int x{1}; -- VarDecl now has getInitStyle(), which indicates which of the above was used. -- CXXConstructExpr now has a flag to indicate that it represents list- initialization, although this is not yet used. - InstantiateInitializer was renamed to SubstInitializer and simplified. - ActOnParenOrParenListExpr has been replaced by ActOnParenListExpr, which always produces a ParenListExpr. Placed that so far failed to convert that back to a ParenExpr containing comma operators have been fixed. I'm pretty sure I could have made a crashing test case before this. The end result is a (I hope) considerably cleaner design of initializers. More importantly, the fact that I can now distinguish between the various initialization kinds means that I can get the tricky generalized initializer test cases Johannes Schaub supplied to work. (This is not yet done.) This commit passed self-host, with the resulting compiler passing the tests. I hope it doesn't break more complicated code. It's a pretty big change, but one that I feel is necessary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150318 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p5.cpp
|
b70126a328f89937f46db42f9e3cba1592887c91 |
03-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
When a pack expansion occurs in the template argument list of an alias template without a corresponding parameter pack, don't immediately substitute the alias template. This is under discussion in the C++ committee, and may become ill-formed, but for now we match GCC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149697 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/fixed-expansion.cpp
|
8fbbae532e3cb5f45e9e862c60d48c78b0997325 |
03-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Implement support for a pack expansion into a fixed-length template. Such pack expansions can easily fail at template instantiation time, if the expanded parameter packs are of the wrong length. Fixes <rdar://problem/10040867>, PR9021, and the example that came up today at Going Native. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149685 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/fixed-expansion.cpp
|
6aeaa60217e1ed11a621409acf1b53df0d14b591 |
05-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Tweak the fix to PR8977: an empty expression-list represents value initialization, not default initialization. Fixes PR11712. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147620 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p4.cpp
|
fc038e9ef8ed262724f42597ca5c844de97b1202 |
17-Dec-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Remove a non-gcc-compatible extension that would apply attributes on declarations without a declarator to structs. Add a warning for ignored attributes. Patch by Michael Han. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146796 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p5.cpp
|
0b64ba926752110cff1344a46b36e29396cc4d25 |
23-Oct-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Fix grammar for C++11 alignment specifiers, and add a few FIXMEs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142760 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p5.cpp
|
fef2189421b89dad5582b6dd7561badd4224d974 |
23-Oct-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Diagnose unexpanded parameter packs in member initialisers (including in-class member initialisers). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142758 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p5.cpp
|
762bb9d0ad20320b9f97a841dce57ba5e8e48b07 |
14-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Update all tests other than Driver/std.cpp to use -std=c++11 rather than -std=c++0x. Patch by Ahmed Charles! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141900 91177308-0d34-0410-b5e6-96231b3b80d8
3.cpp
emp.alias/p1.cpp
emp.alias/p2.cpp
emp.alias/p3.cpp
emp.class.spec/p8-0x.cpp
emp.class.spec/p9-0x.cpp
emp.fct/temp.func.order/p3-0x.cpp
emp.variadic/deduction.cpp
emp.variadic/example-bind.cpp
emp.variadic/example-function.cpp
emp.variadic/example-tuple.cpp
emp.variadic/ext-blocks.cpp
emp.variadic/injected-class-name.cpp
emp.variadic/metafunctions.cpp
emp.variadic/multi-level-substitution.cpp
emp.variadic/p1.cpp
emp.variadic/p2.cpp
emp.variadic/p4.cpp
emp.variadic/p5.cpp
emp.variadic/parameter-matching.cpp
emp.variadic/partial-ordering.cpp
|
5fad9b8362c62e230f6603d86ec7d1747e74c737 |
12-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
When we determine that a function template specialization produced as part of template argument deduction is ill-formed, we mark it as invalid and treat it as a deduction failure. If we happen to find that specialization again, treat it as a deduction failure rather than silently building a call to the declaration. Fixes PR11117, a marvelous bug where deduction failed after creating an invalid specialization, causing overload resolution to pick a different candidate. Then we performed a similar overload resolution later, and happily picked the invalid specialization to call... resulting in a silent link failure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141809 91177308-0d34-0410-b5e6-96231b3b80d8
emp.mem/p5.cpp
|
089e8939b7b3e72c32477e39df82f18e6a8f436e |
10-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
When substituting into a sizeof parameter pack expression in a context where we can't expand (i.e., multi-level substitution), be sure to substitute the pack with its level-reduced pack. Fixes PR10230. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141568 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/multi-level-substitution.cpp
|
33ab0da4b50c0868f0dbbbbb8d018b44acd2bd4d |
09-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
A friend template specialization is also dependent if any of its template arguments are dependent. Fixes PR10913. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141515 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p1.cpp
|
85ea7aa961deac1d754f610af8062ae3f8b4e2a5 |
30-Aug-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Declare and define implicit move constructor and assignment operator. This makes the code duplication of implicit special member handling even worse, but the cleanup will have to come later. For now, this works. Follow-up with tests for explicit defaulting and enabling the __has_feature flag to come. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138821 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p4.cpp
|
fc92137eee708b632c00a9b0934ff87aeae234a5 |
20-May-2011 |
Douglas Gregor <dgregor@apple.com> |
Diagnose unexpanded parameter packs in return statements. This manifested in a crash with blocks in PR9953, but it was a ticking time bomb for normal functions, too. Fixes PR9953. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131731 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/ext-blocks.cpp
|
536e9c1f103f3e59ed47e35090819eb93596c35b |
06-May-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Slight tweak to alias template error handling: don't guess that a template-id in an alias declaration was meant to be a specialization. Use a generic, but more accurate, diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130961 91177308-0d34-0410-b5e6-96231b3b80d8
3.cpp
|
3e4c6c4c79a03f5cb0c4671d7c282d623c6dc35e |
05-May-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement support for C++0x alias templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130953 91177308-0d34-0410-b5e6-96231b3b80d8
3.cpp
emp.alias/p1.cpp
emp.alias/p2.cpp
emp.alias/p3.cpp
|
0f4be74ff0273e505d383f89174ef539828424ed |
03-May-2011 |
Chandler Carruth <chandlerc@gmail.com> |
When parsing a template friend declaration we dropped the template parameters on the floor in certain cases: class X { template <typename T> friend typename A<T>::Foo; }; This was parsed as a *non* template friend declaration some how, and received an ExtWarn. Fixing the parser to actually provide the template parameters to the freestanding declaration parse triggers the code which specifically looks for such constructs and hard errors on them. Along the way, this prevents us from trying to instantiate constructs like the above inside of a outer template. This is important as loosing the template parameters means we don't have a well formed declaration and template instantiation will be unable to rebuild the AST. That fixes a crash in the GCC test suite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130772 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p3.cpp
|
ad762fcdc16b9e4705b12b09d92b8c026212b906 |
15-Apr-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add support for C++0x's range-based for loops, as specified by the C++11 draft standard (N3291). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129541 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p5.cpp
|
018591f524ca4f3a1e657d0d0a66eadf9dbd55f6 |
02-Mar-2011 |
John McCall <rjmccall@apple.com> |
Semantic checking for exception specifications should be triggered by whether C++ exceptions are enabled, not exceptions in general. PR9358. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126820 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p4.cpp
|
406f98f6a5a7bde5707085af8d66204e7e76af45 |
02-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
When we're substituting into a parameter-type-list nested inside the pattern of an expansion, and we have a paramameter that is not a parameter pack, don't suppress substitution of parameter packs within this context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126819 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/multi-level-substitution.cpp
|
abea951c34876a5374d0e3678c7989b225c5c895 |
28-Feb-2011 |
Anders Carlsson <andersca@mac.com> |
Add -fcxx-exceptions to all tests that use C++ exceptions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126599 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p5.cpp
|
e41721e7dfabcc15cb50be9075a4153f1ad648ea |
19-Feb-2011 |
Anders Carlsson <andersca@mac.com> |
Pass -fexceptions to all tests that use try/catch/throw. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126037 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p5.cpp
|
c6daf0b29d6c48a99cb1ad707973a7e6dfcafd58 |
17-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
When printing a qualified type, look through a substituted template parameter type to see what's behind it, so that we don't end up printing silly things like "float const *" when "const float *" would make more sense. Also, replace the pile of "isa" tests with a simple switch enumerating all of the cases, making a few more obvious cases use prefix qualifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125729 91177308-0d34-0410-b5e6-96231b3b80d8
emp.mem/p5.cpp
|
f1602a56f89ac48aa1b5bce42f07ee795e674a6f |
22-Jan-2011 |
Anders Carlsson <andersca@mac.com> |
A member function template cannot be virtual. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124031 91177308-0d34-0410-b5e6-96231b3b80d8
emp.mem/p3.cpp
|
a779d9ca2fdf1247f65de0e6acf2870d8be53ccd |
19-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement basic support for the use of variadic templates and blocks together. In particular: - Handle the use of captured parameter pack names within blocks (BlockDeclRefExpr understands parameter packs now) - Handle the declaration and expansion of parameter packs within a block's parameter list, e.g., ^(Args ...args) { ... }) - Handle instantiation of blocks where the return type was not explicitly specified. (unrelated, but necessary for my tests). Together, these fixes should make blocks and variadic templates work reasonably well together. Note that BlockDeclRefExpr is still broken w.r.t. its computation of type and value dependence, which will still cause problems for blocks in templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123849 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/ext-blocks.cpp
|
6952f1e4256c5b43aee5e98cea4e9b663bd1d413 |
19-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement support for non-type template parameter packs whose type is a pack expansion, e.g., the parameter pack Values in: template<typename ...Types> struct Outer { template<Types ...Values> struct Inner; }; This new implementation approach introduces the notion of an "expanded" non-type template parameter pack, for which we have already expanded the types of the parameter pack (to, say, "int*, float*", for Outer<int*, float*>) but have not yet expanded the values. Aside from creating these expanded non-type template parameter packs, this patch updates template argument checking and non-type template parameter pack instantiation to make use of the appropriate types in the parameter pack. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123845 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/multi-level-substitution.cpp
|
9da95e6eefc4b0ca25e18bdab1b703f5c185deab |
16-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Tweak the partial ordering rules for function templates to prefer a non-variadic function template over a variadic one. This matches GCC and the intent of the C++0x wording, in a way that I think is likely to be acceptable to the committee. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123581 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/partial-ordering.cpp
|
1aee05d08b2184acadeb36de300e216390780d6c |
15-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Introduce a new kind of TemplateName that captures a substituted template template parameter pack that cannot be fully expanded because its enclosing pack expansion could not be expanded. This form of TemplateName plays the same role as SubstTemplateTypeParmPackType and SubstNonTypeTemplateParmPackExpr do for template type parameter packs and non-type template parameter packs, respectively. We should now handle these multi-level pack expansion substitutions anywhere. The largest remaining gap in our variadic-templates support is that we cannot cope with non-type template parameter packs whose type is a pack expansion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123521 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/multi-level-substitution.cpp
|
c7793c73ba8a343de3f2552d984851985a46f159 |
15-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Introduce a new expression kind, SubstNonTypeTemplateParmPackExpr, that captures the substitution of a non-type template argument pack for a non-type template parameter pack within a pack expansion that cannot be fully expanded. This follows the approach taken by SubstTemplateTypeParmPackType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123506 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/multi-level-substitution.cpp
|
2be29f423acad3bbe39099a78db2805acb5bdf17 |
15-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Teach template template argument pack expansions to keep track of the number of expansions, when we know it, and propagate that information through Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123493 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/multi-level-substitution.cpp
|
6a24bfda084f06a0b252b7befe8cbb17fce7f94e |
14-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Handle substitutions into function parameter packs whose patterns contain multiple parameter packs at different levels. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123488 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/multi-level-substitution.cpp
|
67fd1251aad51bb80d050b7fa5e506fef0ec8e02 |
14-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Teach PackExpansionExpr to keep track of the number of pack expansions it will expand to, if known. Propagate this information throughout Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123470 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/multi-level-substitution.cpp
|
07a77b4b1d1fa95930129541eff8b79558f5d80d |
14-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
When we're instantiating a direct variable initializer that has a pack expansion in it, we may end up instantiating to an empty expression-list. In this case, the variable is uninitialized; tweak the instantiation logic to handle this case. Fixes PR8977. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123449 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p4.cpp
|
cded4f649cd4b7ba7d461c25c6482ef52b8d3a2a |
14-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Keep track of the number of expansions to be produced from a type pack expansion, when it is known due to the substitution of an out parameter pack. This allows us to properly handle substitution into pack expansions that involve multiple parameter packs at different template parameter levels, even when this substitution happens one level at a time (as with partial specializations of member class templates and the signatures of member function templates). Note that the diagnostic we provide when there is an arity mismatch between an outer parameter pack and an inner parameter pack in this case isn't as clear as the normal diagnostic for an arity mismatch. However, this doesn't matter because these cases are very, very rare and (even then) only typically occur in a SFINAE context. The other kinds of pack expansions (expression, template, etc.) still need to support optional tracking of the number of expansions, and we need the moral equivalent of SubstTemplateTypeParmPackType for substituted argument packs of template template and non-type template parameters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123448 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/multi-level-substitution.cpp
|
c3069d618f4661d923cb1b5c4525b082fce73b04 |
14-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Start implementing support for substitution into pack expansions that involve template parameter packs at multiple template levels that occur within the signatures members of class templates (and partial specializations thereof). This is a work-in-progress that is deficient in several ways, notably: - It only works for template type parameter packs, but we need to also support non-type template parameter packs and template template parameter packs. - It doesn't keep track of the lengths of the substituted argument packs in the expansion, so it can't properly diagnose length mismatches. However, this is a concrete step in the right direction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123425 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/multi-level-substitution.cpp
|
c421f546e63b2f85caa1ca0d94d508f99bb871cb |
13-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Only apply the parameter pack matching of C++0x [temp.arg.template]p3 when we're actually matching a template template argument to a template template parameter. Otherwise, use strict matching. Fixes <rdar://problem/8859985> clang++: variadics and out-of-line definitions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123385 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/parameter-matching.cpp
|
4f1d282d6f32a419e89ddb56342e2313b0c78bb7 |
13-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Allow us to transform pack expansion expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123349 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/injected-class-name.cpp
|
a03478231363c67ea0e1f4bc1bc708e064040e56 |
13-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement C++0x [temp.arg.template]p3, which allows slightly fuzzy matching of variadic template template parameters to template arguments. This paragraph was the subject of ISO C++ committee document N2555: Extending Variadic Template Template Parameters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123348 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/metafunctions.cpp
|
ac6c09917eaf32a35d2c7c95856864d877ef1963 |
12-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Add some more partial-ordering tests, including one that changes with the proposed resolution to core isue 692. I'm not certain which way we'll go on this one. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123331 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/partial-ordering.cpp
|
2fc1bb76e719d0620b4a6e2134413933b21ca6b6 |
12-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Teach TreeTransform how to transform a pack expansion type into another pack expansion type. This can happen when rebuilding types in the current instantiation. Fixes <rdar://problem/8848837> (Clang crashing on libc++ <functional>). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123316 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/injected-class-name.cpp
|
77d6bb9e223496aa5288294f34e7225d1f65dddc |
11-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement partial ordering of class template partial specializations and function templates that contain variadic templates. This involves three small-ish changes: (1) When transforming a pack expansion, if the transformed argument still contains unexpanded parameter packs, build a pack expansion. This can happen during the substitution that occurs into class template partial specialiation template arguments during partial ordering. (2) When performing template argument deduction where the argument is a pack expansion, match against the pattern of that pack expansion. (3) When performing template argument deduction against a non-pack parameter, or a non-expansion template argument, deduction fails if the argument itself is a pack expansion (C++0x [temp.deduct.type]p22). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123279 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/partial-ordering.cpp
|
10ffc00e2177f042808f507c8dd50b744ed6f738 |
11-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Add testing for unexpanded parameter packs in all of the C++ expression kinds. This is (indirectly) a test verifying that the recursive AST visitor is visiting the children of these expression nodes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123198 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p5.cpp
|
d3731198193eee92796ddeb493973b7a598b003e |
10-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Work-in-progress implementation of C++0x [temp.arg.explicit]p9, which allows an argument pack determines via explicit specification of function template arguments to be extended by further, deduced arguments. For example: template<class ... Types> void f(Types ... values); void g() { f<int*, float*>(0, 0, 0); // Types is deduced to the sequence int*, float*, int } There are a number of FIXMEs in here that indicate places where we need to implement + test retained expansions, plus a number of other places in deduction where we need to correctly cope with the explicitly-specified arguments when deducing an argument pack. Furthermore, it appears that the RecursiveASTVisitor needs to be auditied; it's missing some traversals (especially w.r.t. template arguments) that cause it not to find unexpanded parameter packs when it should. The good news, however, is that the tr1::tuple implementation now works fully, and the tr1::bind example (both from N2080) is actually working now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123163 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/example-bind.cpp
emp.variadic/example-tuple.cpp
|
e8bbf98ba4a388d89d1b4da9e15aabedf8eb53a6 |
07-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Variadic templates example: a nearly-complete implementation of a TR1 function class template. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123024 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/example-function.cpp
emp.variadic/example-tuple.cpp
|
03414b98caba86771622c35b1fa70d13de0c14ba |
07-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Variadic templates example: a nearly-complete implementation of a TR1 tuple class template. This implementation is boosted directly from the variadic templates proposal. N2080. Note that one section is #ifdef'd out. I'll implement that aspect of template argument deduction next. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123016 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/example-tuple.cpp
|
12c9c00024a01819e3a70ef6d951d32efaeb9312 |
07-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement substitution of a function parameter pack for its set of instantiated function parameters, enabling instantiation of arbitrary pack expansions involving function parameter packs. At this point, we can now correctly compile a simple, variadic print() example: #include <iostream> #include <string> void print() {} template<typename Head, typename ...Tail> void print(const Head &head, const Tail &...tail) { std::cout << head; print(tail...); } int main() { std::string hello = "Hello"; print(hello, ", world!", " ", 2011, '\n'); } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123000 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p2.cpp
emp.variadic/p5.cpp
|
603cfb4da2f7ba08a1c3452c2fbf70585b8e7621 |
06-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Initial implementation of function parameter packs. This implementation allows: 1) Declaration of function parameter packs 2) Instantiation of function parameter packs within function types. 3) Template argument deduction of function parameter packs when matching two function types. We're missing all of the important template-instantiation logic for function template definitions, along with template argument deduction from the argument list of a function call, so don't even think of trying to use these for real yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122926 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/metafunctions.cpp
|
d53e16abd1dcaa2942d5183f48e7f63d0e75b35a |
05-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
When we're converting deduced template arguments to the type of the corresponding template parameter, make sure that prior converted template arguments are available for substitution. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122902 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/metafunctions.cpp
|
a7fc901a2e39bfe55bfcff5934b2d9fdf9656491 |
05-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Replace the representation of template template argument pack expansions with something that is easier to use correctly: a new template argment kind, rather than a bit on an existing kind. Update all of the switch statements that deal with template arguments, fixing a few latent bugs in the process. I"m happy with this representation, now. And, oh look! Template instantiation and deduction work for template template argument pack expansions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122896 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/metafunctions.cpp
emp.variadic/p4.cpp
|
f457c1a0a46d11623c3d4594b57dff7f5a1151da |
05-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement proper parameter pack matching for non-type template parameters and template template parameters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122875 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/parameter-matching.cpp
|
61c4d28e36cd3f1be392cb77f07436d1fa6b0f9f |
05-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement support for template template parameter packs, e.g., template<template<class> class ...Metafunctions> struct apply_to_each; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122874 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/metafunctions.cpp
emp.variadic/p5.cpp
emp.variadic/parameter-matching.cpp
|
54c53cca105ed595e12fecf04e415c3712bda936 |
05-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Improve our handling of non-type template parameters in partial specializations. We weren't dealing with any of the cases where the type of the non-type template argument differs from the type of the corresponding template parameter in the primary template. We would think that the template parameter in the partial specialization was not deducible (and warn about it, incorrectly), then fail to convert a deduced parameter to the type of the template parameter in the partial specialization (which may involve truncation, among other things). Fixes PR8905. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122851 91177308-0d34-0410-b5e6-96231b3b80d8
emp.class.spec/p9.cpp
emp.variadic/deduction.cpp
|
b9a7d6fb53f2b76df2ef832146a1edb4cb01b9f6 |
04-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Improve the checking of deduced template arguments stored within template argument packs when finishing template argument deduction for a function template git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122843 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/deduction.cpp
|
b95cc97b2023d00cd3fbae8455bc9d728eab5e5d |
04-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
When creating the injected-class-name for a class template involving a non-type template parameter pack, make sure to create a pack expansion for the corresponding template argument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122799 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/metafunctions.cpp
|
3fb9e4b89f72823f162096086f0f964e6dcf66d6 |
04-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement pack expansion of base initializers, so that we can initialize those lovely mixins that come from pack expansions of base specifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122793 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p4.cpp
|
f90b27ad077c3339b62befc892382845339f9490 |
03-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement pack expansions whose pattern is a base-specifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122782 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p4.cpp
|
69e5aed635946419d85a6be8639260e2eb476cb1 |
03-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Add a test that is currently failing git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122780 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/metafunctions.cpp
|
7a21fd45d4f04643cbfb5df96a01f84bc6d3dd14 |
03-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Properly rebuild pack expansions whose pattern is a non-type template argument. As part of this, be more careful when determining if there are any parameter packs that cannot be expanded. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122776 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/multi-level-substitution.cpp
emp.variadic/p5.cpp
|
bacb9493770ff19cfd8f7bc46a075f14b4d08159 |
03-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Unwrap template argument packs when checking the template arguments of a class template partial specialiation, and look through pack expansions when checking the conditions of C++0x [temp.class.spec]p8. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122774 91177308-0d34-0410-b5e6-96231b3b80d8
emp.class.spec/p8-0x.cpp
|
925910d488051cbd4e38f350c1e9d69c473f09a0 |
03-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Diagnose the presence of unexpanded parameter packs within class template partial specialization arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122769 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p5.cpp
|
dcaa1ca0b475dfa887e1d061678a1e3501288510 |
03-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement support for pack expansions in initializer lists and expression lists. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122764 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p4.cpp
|
dee196ef31073b40c48d60d9fa626ee1d8daaaee |
03-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Another variadic template metafunction test case: summing values. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122752 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/metafunctions.cpp
|
be230c36e32142cbdcdbe9c97511d097beeecbab |
03-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement support for pack expansions whose pattern is a non-type template argument (described by an expression, of course). For example: template<int...> struct int_tuple { }; template<int ...Values> struct square { typedef int_tuple<(Values*Values)...> type; }; It also lays the foundation for pack expansions in an initializer-list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122751 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/metafunctions.cpp
|
81063a237722ae010bca325021b92436f8c56e05 |
03-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Consolidate template metafunction tests for variadic templates into a single file git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122748 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/count.cpp
emp.variadic/metafunctions.cpp
emp.variadic/replace.cpp
|
56bc9832bc8f80604bfddc2c93f81537df6930a1 |
24-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
When instantiating a non-type template parameter pack, be sure to extract the appropriate argument from the argument pack (based on the current substitution index, of course). Simple instantiation of pack expansions involving non-type template parameter packs now works. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122532 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p4.cpp
|
10738d36b150aa65206890c1c845cdba076e4200 |
24-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Add an AST representation for non-type template parameter packs, e.g., template<typename T, unsigned ...Dims> struct multi_array; along with semantic analysis support for finding unexpanded non-type template parameter packs in types, expressions, and so on. Template instantiation involving non-type template parameter packs probably doesn't work yet. That'll come soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122527 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p5.cpp
|
b9c6631941619fb8c74f1056fbc56270629201c1 |
23-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Reimplement the comparison of a class template partial specialization's template arguments against the primary template's template arguments using the obvious, correct method of checking the injected-class-name type (C++ [temp.class.spec]p9b3). The previous incarnation of this comparison attempted to use its own formulation of the injected-class-name, which is redudant and, with the introduction of variadic templates, became wrong (again). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122508 91177308-0d34-0410-b5e6-96231b3b80d8
emp.class.spec/p9-0x.cpp
|
b7d09d627c8576b9bc85f44f05befdd44fedc7ed |
23-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
When forming the injected-class-name of a variadic template, the template argument corresponding to a template parameter pack is an argument pack of a pack expansion of that template parameter pack. Implements C++0x [temp.dep.type]p2 (at least, as much of it as we can). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122498 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/injected-class-name.cpp
|
e02e26293cf8e3bad1059b39cea75c6582896da6 |
22-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement template argument deduction for pack expansions whose pattern is a template argument, which involves repeatedly deducing template arguments using the pattern of the pack expansion, then bundling the resulting deductions into an argument pack. We can now handle a variety of simple list-handling metaprograms using variadic templates. See, e.g., the new "count" metaprogram. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122439 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/count.cpp
|
0972c867e72171f24052d7b6d307020c065f8a66 |
22-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
When performing template argument deduction where the argument is a dependent template specialization type, the number of template arguments need not match precisely. Rather than checking the number of arguments eagerly (which does not consider argument packs), let the deduction routine for template argument lists cope with too many/too few arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122425 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/replace.cpp
|
20a55e2515ce89ddf9993941f9b5d0f3a6c91b4f |
22-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Implicitly expand argument packs when performing template argument deduction. Unify all of the looping over template arguments for deduction purposes into a single place, where argument pack expansion occurs; this is also the hook for deducing from pack expansions, which itself is not yet implemented. For now, at least we can handle a basic "count" metafunction written with variadics. See the new test for the formulation that works. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122418 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/count.cpp
|
55dc95b69846fde1c41aff7e2f3fcfed5d6fc5ab |
21-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Add test for C++ [temp.friend]p8, which bans partial specializations from being friends git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122335 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p8.cpp
|
b99268b3083c882103bd1bd08bdcc9a76a2b4795 |
21-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement instantiation of pack expansions whose pattern is a type-id in an exception specification. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122297 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p4.cpp
|
a04426c5416f22df1078f6b31c1619de73c40b59 |
21-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Extend the parser to support pack expansions within exception specifications. We can't yet instantiate them, however, since I tripped over PR8835. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122292 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p4.cpp
|
88f30dee6ca6d99e46d4ce61f691fb3dff4ae7c8 |
20-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Test template instantiation of pack expansions where the parameter pack is in a nested-name-specifier git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122282 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p4.cpp
|
dace95b13e2ceb0c3ec8de6babd926dc5114e1e5 |
20-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Clean up the printing of template argument packs; previously, we were getting extra "<>" delimiters around template argument packs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122280 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p4.cpp
emp.variadic/p5.cpp
|
8491ffe86c50241b47c6d7ef8cd9ee00f5e675da |
20-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement basic support for template instantiation of pack expansions whose patterns are template arguments. We can now instantiate, e.g., typedef tuple<pair<OuterTypes, InnerTypes>...> type; where OuterTypes and InnerTypes are template type parameter packs. There is a horrible inefficiency in TemplateArgumentLoc::getPackExpansionPattern(), where we need to create copies of TypeLoc data because our interfaces traffic in TypeSourceInfo pointers where they should traffic in TypeLocs instead. I've isolated in efficiency in this one routine; once we refactor our interfaces to traffic in TypeLocs, we can eliminate it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122278 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p4.cpp
emp.variadic/p5.cpp
|
14be16b93941aa4c4909b596d52a34af70ee1928 |
20-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
When checking a template argument list against a template containing a parameter pack, check the parameter pack against each of the template arguments it corresponds to, then pack the converted arguments into a template argument pack. Allows us to use variadic class templates so long as instantiation isn't required, e.g., template<typename... Types> struct Tuple; Tuple<int, float> *t2; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122251 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p1.cpp
|
7536dd5e6c99584481b7dab68b7e7d8df9c54054 |
20-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce a new type, PackExpansionType, to capture types that are pack expansions, e.g. given template<typename... Types> struct tuple; template<typename... Types> struct tuple_of_refs { typedef tuple<Types&...> types; }; the type of the "types" typedef is a PackExpansionType whose pattern is Types&. This commit introduces support for creating pack expansions for template type arguments, as above, but not for any other kind of pack expansion, nor for any form of instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122223 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p5.cpp
|
a669c534cf414339060868d70d2348fea9ce6c7d |
16-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Add tests checking for unexpanded parameter packs in declarations that occur within statements. Teach Sema::ActOnExceptionDeclarator() to check for unexpanded parameter packs in the exception type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121984 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p5.cpp
|
781def075d4a486a5b367c6730fe77cb1f721ac1 |
16-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Check for unexpanded parameter packs in non-type template parameter types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121964 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p5.cpp
|
6f52675ec400a0ee89ec6214c4845b8ee274304a |
16-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Check for unexpanded parameter packs in default arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121962 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p5.cpp
|
a31040f16604849b3b1dc36015056c81bae68ad1 |
16-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Check for unexpanded parameter packs within variable initializers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121938 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p5.cpp
|
6ccab97c17c17f38eb92c7fe02c766508875bd97 |
16-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Check for unexpanded parameter packs in friend declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121934 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p5.cpp
|
56c04588ef3cfa1bbc968fd68de2480a4e66971d |
16-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Check for unexpanded parameter packs in using declarations. As a drive-by, make sure to check for unexpanded parameter packs within the name of a declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121930 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p5.cpp
|
0c9e4799fd78d350a037498b2c797f2b2558791c |
16-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Check for unexpanded parameter packs in enumeration types and enumerators. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121928 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p5.cpp
|
399ad970a25efcbfa7111e17f48285a70fba2731 |
16-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Check for unexpanded parameter packs in static assertion expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121922 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p5.cpp
|
e186269a8a41dbff1ebea2c251048892979d1078 |
16-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Check for unexpanded parameter packs in various kinds of declarations. This is a work in progress, as I go through the C++ declaration grammar to identify where unexpanded parameter packs can occur. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121912 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p5.cpp
|
cff163e3cc78277496b30fa40070b46abdc290db |
15-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Test that all of the relevant types properly compute the "contains unexpanded parameter pack" bit and that the recursive AST visitor can then find those unexpanded parameter packs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121899 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p5.cpp
|
9ef75899bae6dd9a4be1252ae9cadcb619c170ff |
15-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce a RecursiveASTVisitor subclass that finds all unexpanded parameter packs within a statement, type, etc. Use this visitor to provide improved diagnostics for the presence of unexpanded parameter packs in a full expression, base type, declaration type, etc., by highlighting the unexpanded parameter packs and providing their names, e.g., test/CXX/temp/temp.decls/temp.variadic/p5.cpp:28:85: error: declaration type contains unexpanded parameter packs 'VeryInnerTypes', 'OuterTypes', ... ...VeryInnerTypes, OuterTypes>, pair<InnerTypes, OuterTypes> > types; ~~~~~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~~ ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121883 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p5.cpp
|
bebbe0d9b7568ce43a464286bee49429489ef483 |
15-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Variadic templates: extend the Expr class with a bit that specifies whether the expression contains an unexpanded parameter pack, in the same vein as the changes to the Type hierarchy. Compute this bit within all of the Expr subclasses. This change required a bunch of reshuffling of dependency calculations, mainly to consolidate them inside the constructors and to fuse multiple loops that iterate over arguments to determine type dependence, value dependence, and (now) containment of unexpanded parameter packs. Again, testing is painfully sparse, because all of the diagnostics will change and it is more important to test the to-be-written visitor that collects unexpanded parameter packs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121831 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p5.cpp
|
d0937224f383c7cc72c947119380f9713a070c73 |
13-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Variadic templates: extend Type, NestedNameSpecifier, TemplateName, and TemplateArgument with an operation that determines whether there are any unexpanded parameter packs within that construct. Use this information to diagnose the appearance of the names of parameter packs that have not been expanded (C++ [temp.variadic]p5). Since this property is checked often (every declaration, ever expression statement, etc.), we extend Type and Expr with a bit storing the result of this computation, rather than walking the AST each time to determine whether any unexpanded parameter packs occur. This commit is deficient in several ways, which will be remedied with future commits: - Expr has a bit to store the presence of an unexpanded parameter pack, but it is never set. - The error messages don't point out where the unexpanded parameter packs were named in the type/expression, but they should. - We don't check for unexpanded parameter packs in all of the places where we should. - Testing is sparse, pending the resolution of the above three issues. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121724 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/p5.cpp
|
8d706ecf488c4f548c4f8cf0aa08ea82a4d6a5ba |
15-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement C++0x [temp.func.order]p3 (aka DR532) properly. In particular, we only add the implement object parameter type if only one of the function templates is a non-static member function template. Moreover, since this DR differs from existing practice in C++98/03, this commit implements the existing practice (which ignores the first parameter of the function template that is not the non-static member function template) in C++98/03 mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119145 91177308-0d34-0410-b5e6-96231b3b80d8
emp.fct/temp.func.order/p3-0x.cpp
emp.fct/temp.func.order/p3.cpp
|
d65587f7a6d38965fa37158d3f57990a7faf3836 |
10-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
Instantiate class member template partial specialization declarations in the order they occur within the class template, delaying out-of-line member template partial specializations until after the class has been fully instantiated. This fixes a regression introduced by r118454 (itself a fix for PR8001). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118704 91177308-0d34-0410-b5e6-96231b3b80d8
emp.class.spec/p6.cpp
|
4e2cbb28baa0342b51336e55c519cd06308c4df2 |
20-Oct-2010 |
John McCall <rjmccall@apple.com> |
When matching template parameter lists to template-ids in a scope specifier on a friend declaration, skip template-ids which do not depend on the current parameter list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116911 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p1.cpp
|
c54d688c604d28dcb9ab8f92047837c10c8f9c61 |
19-Oct-2010 |
John McCall <rjmccall@apple.com> |
When instantiating a dependently-scoped friend function declaration, we may need to complete the type before looking into it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116795 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p1.cpp
|
4eab39f0745fb1949dbb40c4145771b927888242 |
19-Oct-2010 |
John McCall <rjmccall@apple.com> |
Instantiate enclosing template parameter lists when instantiating friends. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116789 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p5.cpp
|
613ef3d4c144f8c35224daf28a187426d2044aee |
19-Oct-2010 |
John McCall <rjmccall@apple.com> |
Uncomputable contexts are always records but can exist. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116787 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p5.cpp
|
9a34edb710917798aa30263374f624f13b594605 |
19-Oct-2010 |
John McCall <rjmccall@apple.com> |
Redirect templated friend class decls to a new Sema callback and construct an unsupported friend when there's a friend with a templated scope specifier. Fixes a consistency crash, rdar://problem/8540527 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116786 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p5.cpp
|
337ec3d0e8cb24a591ecbecdc0a995a167f6af01 |
13-Oct-2010 |
John McCall <rjmccall@apple.com> |
Handle dependent friends more explicitly and deal with the possibility of templated-scope friends by marking them invalid and white-listing all accesses until such time as we implement them. Fixes a crash, this time without a broken test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116364 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p5.cpp
|
58f9e13e87e57236fee4b914eea9be6f92a1c345 |
05-Sep-2010 |
Chris Lattner <sabre@nondot.org> |
make clang print types as "const int *" instead of "int const*", which is should have done from the beginning. As usual, the most fun with this sort of change is updating all the testcases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113090 91177308-0d34-0410-b5e6-96231b3b80d8
emp.mem/p5.cpp
|
df48ddf97fb5a1310c99f3ece5255477dc1bbbdb |
30-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Add test case from PR6952, which now works (thanks to Gabor). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112477 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p4.cpp
|
72c4c15e030cabf71cffc899ca779a251bcc72d1 |
20-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Revert r111609, which is failing its new test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111611 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p5.cpp
|
29c695b86199ce917fd59b875683960a1858342a |
20-Aug-2010 |
John McCall <rjmccall@apple.com> |
Detect efforts to declare a template member friend and explicitly ignore them. Avoids a crash. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111609 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p5.cpp
|
a417b87e5d0f0508c7b18824d89d489bb55b7bd1 |
04-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
When checking for equality of template parameter lists, a template type parameter pack is distinct from a template type parameter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105464 91177308-0d34-0410-b5e6-96231b3b80d8
emp.variadic/parameter-matching.cpp
|
238058c372cfb7bdaf489f51171eb1380ebfd6a6 |
18-May-2010 |
Douglas Gregor <dgregor@apple.com> |
I hate this commit. Revert much of the implementation of C++98/03 [temp.friend]p5 in r103943 and its follow-ons r103948 and r103952. While our implementation was technically correct, other compilers don't seem to implement this paragraph (which forces the instantiation of friend functions defined in a class template when a class template specialization is instantiated), and doing so broke a bunch of Boost libraries. Since this behavior has changed in C++0x (which instantiates the friend function definitions when they are used), we're going to skip the nowhere-implemented C++98/03 semantics and go straight to the C++0x semantics. This commit is a band-aid to get Boost up and running again. It doesn't really fix PR6952 (which this commit un-fixes), but it does deal with the way Boost.Units abuses this particular paragraph. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104014 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p4.cpp
|
cfe833be882f600206f1587f157b025b368497d7 |
17-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Diagnose a redefinition error when there are two instantiations of friend functions defined inside a class template. Fixes PR6952, the last Boost.Units failure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103952 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p4.cpp
|
6cfacfe54c75baa4d67f1fbdf4f80644b662818e |
17-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Determine when the instantiation of a friend function defined inside a class template conflicts with an existing (non-template) definition. This is another part of PR6952. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103948 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p4.cpp
|
ac7c2c8a9d47df7d652364af3043c41816a18fa4 |
17-May-2010 |
Douglas Gregor <dgregor@apple.com> |
C++98/03 [temp.friend]p4 requires that inline function definitions within class templates be instantiated along with each class template specialization, even if the functions are not used. Do so, as a baby step toward PR6952. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103943 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p4.cpp
|
516e6e09821a61e8975c787e189949723249e7c5 |
29-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
When performing partial ordering of class template partial specializations, substitute the deduced template arguments and check the resulting substitution before concluding that template argument deduction succeeds. This marvelous little fix makes a bunch of Boost.Spirit tests start working. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102601 91177308-0d34-0410-b5e6-96231b3b80d8
emp.class.spec/temp.class.order/p2.cpp
|
0d6b1640eb4d1a4a0203235cfdfcdaf3335af36d |
23-Apr-2010 |
John McCall <rjmccall@apple.com> |
Recommit my change to how C++ does elaborated type lookups, now with two bugfixes which fix selfhost and (hopefully) the nightly tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102198 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p1.cpp
|
00b40d3f2fb8b2f9043daf3dd4558bff98346b3c |
23-Apr-2010 |
Daniel Dunbar <daniel@zuster.org> |
Revert "C++ doesn't really use "namespaces" for different kinds of names the same", which seems to break most C++ nightly test apps. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102174 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p1.cpp
|
d04efc98d08731e31bd73f430803acc5ffa9040a |
23-Apr-2010 |
John McCall <rjmccall@apple.com> |
C++ doesn't really use "namespaces" for different kinds of names the same way that C does. Among other differences, elaborated type specifiers are defined to skip "non-types", which, as you might imagine, does not include typedefs. Rework our use of IDNS masks to capture the semantics of different kinds of declarations better, and remove most current lookup filters. Removing the last remaining filter is more complicated and will happen in a separate patch. Fixes PR 6885 as well some spectrum of unfiled bugs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102164 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p1.cpp
|
74256f5ea6950c9fd34595aa124eb4740372f15c |
14-Apr-2010 |
John McCall <rjmccall@apple.com> |
Parse friend template ids as types instead of ending up in ActOnClassTemplateSpecialization and being very confused. Fixes PR6514 (for non-templated-scope friends). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101198 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p1.cpp
|
21c0160959961b3a6ab3308608ee3fde182ecb49 |
14-Apr-2010 |
John McCall <rjmccall@apple.com> |
Fix an embarrasing memory error. I was apparently very tired when I wrote this code the first time. Fixes PR6827. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101184 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p1.cpp
|
57265e35292897e383d70bbd1d552209fac37b39 |
12-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix a crash-on-invalid involving name lookup of tag names, where we ended up finding a function template that we didn't expect. Recover more gracefully, and fix a similar issue for class templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101040 91177308-0d34-0410-b5e6-96231b3b80d8
emp.mem/p1.cpp
|
7002f4c03c2d0544f4e8bea8d3a5636519081e35 |
09-Apr-2010 |
John McCall <rjmccall@apple.com> |
Turn access control on by default in -cc1. Remove -faccess-control from -cc1; add -fno-access-control. Make the driver pass -fno-access-control by default. Update a bunch of tests to be correct under access control. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100880 91177308-0d34-0410-b5e6-96231b3b80d8
emp.class.spec/temp.class.order/p2.cpp
emp.friend/p1.cpp
|
ea7390c7b384ce607bfc8fc13c01f37cfc3776f0 |
08-Apr-2010 |
John McCall <rjmccall@apple.com> |
Set access properly on instantiated friend class template declarations. Fixes PR6752. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100806 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p1.cpp
|
af2094e7cecadf36667deb61a83587ffdd979bd3 |
08-Apr-2010 |
John McCall <rjmccall@apple.com> |
Implement dependent friend function template specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100753 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p1.cpp
|
06245bfb3ae40bb24a8bfb17eafeb266a4daf5ca |
07-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve handling of friend types in several ways: - When instantiating a friend type template, perform semantic analysis on the resulting type. - Downgrade the errors concerning friend type declarations that do not refer to classes to ExtWarns in C++98/03. C++0x allows practically any type to be befriended, and ignores the friend declaration if the type is not a class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100635 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p3.cpp
|
b0cb022daec8671406ab25f4b5d5a6d48d823bc4 |
27-Mar-2010 |
John McCall <rjmccall@apple.com> |
Implement method friends in class templates and fix a few related problems. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99708 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p1.cpp
|
d325daa506338ab86f9dd468b48fd010673f49a6 |
26-Mar-2010 |
John McCall <rjmccall@apple.com> |
Reapply r99596 with a fix: link an instantiated friend function to its pattern if it has a body. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99610 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p1.cpp
|
a7bc8559b40a78d664d6c7faf4b42ff21184c146 |
26-Mar-2010 |
John McCall <rjmccall@apple.com> |
Apparently that didn't work. Reverting for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99601 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p1.cpp
|
d7e29e114d20da5b83e0cb7bc29ec717a7458cb1 |
26-Mar-2010 |
John McCall <rjmccall@apple.com> |
Properly instantiate and link in friend function templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99596 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p1.cpp
|
9c86b513cb42ea6d9e3f98cb2b7eda39a2eb526b |
25-Mar-2010 |
John McCall <rjmccall@apple.com> |
Handle simple friend-class decls in class templates better by ensuring that we look for shadow friend decls in the appropriate scope before injecting a new declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99552 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p1.cpp
|
93ba8579c341d5329175f1413cdc3b35a36592d2 |
25-Mar-2010 |
John McCall <rjmccall@apple.com> |
Properly instantiate friend class template declarations and link them into the redeclaration chain. Recommitted from r99477 with a fix: we need to merge in default template arguments from previous declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99496 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p1.cpp
|
e131c574c7baa28eb0759181478d710a2aa60cb6 |
25-Mar-2010 |
Bob Wilson <bob.wilson@apple.com> |
Revert 99477 since it appears to be breaking the clang-x86_64-darwin10-fnt buildbot. The tramp3d test fails. --- Reverse-merging r99477 into '.': U test/SemaTemplate/friend-template.cpp U test/CXX/temp/temp.decls/temp.friend/p1.cpp U lib/Sema/SemaTemplateInstantiateDecl.cpp U lib/Sema/SemaAccess.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99481 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p1.cpp
|
a56623b01ed9f28f10416432d147c7a1729d5f1d |
25-Mar-2010 |
John McCall <rjmccall@apple.com> |
Properly instantiate and link in friend-class-template declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99477 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p1.cpp
|
036ada215d2c53e6a286b42d7cbd2386b0007516 |
24-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Silently drop dependent friend function template specializations, since we have absolutely no way to match them when they are declared nor do we have a way to represent these parsed-but-not-checked friend declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99407 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p1.cpp
|
7ad650f88ecbbe659f10f9f6b34a1f29ea9cf8f9 |
24-Mar-2010 |
John McCall <rjmccall@apple.com> |
Support friend function specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99389 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p1.cpp
|
0c01d18094100db92d38daa923c95661512db203 |
24-Mar-2010 |
John McCall <rjmccall@apple.com> |
Implement a framework for the delay of arbitrary diagnostics within templates. So delay access-control diagnostics when (for example) the target of a friend declaration is a specific specialization of a template. I was surprised to find that this was required for an access-controlled selfhost. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99383 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p1.cpp
|
a742db0032d8f458fe229600d2082981a1fb1481 |
17-Mar-2010 |
John McCall <rjmccall@apple.com> |
Implement non-dependent friend functions and classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98764 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p1.cpp
|
21d53e179651657e243587b79234fe6fedfae71c |
02-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
When we're parsing template names as part of base-specifiers, we are *not* entering the context of the nested-name-specifier. This was causing us to look into an uninstantiated template that we shouldn't look into. Fixes PR6376. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97524 91177308-0d34-0410-b5e6-96231b3b80d8
emp.mem/p1.cpp
|
60c93c9981c467738369702e7aa23fd58c2b6aac |
09-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Migrate the mish-mash of declaration checks in Sema::ActOnUninitializedDecl over to InitializationSequence (with default initialization), eliminating redundancy. More importantly, we now check that a const definition in C++ has an initilizer, which was an #if 0'd code for many, many months. A few other tweaks were needed to get everything working again: - Fix all of the places in the testsuite where we defined const objects without initializers (now that we diagnose this issue) - Teach instantiation of static data members to find the previous declaration, so that we build proper redeclaration chains. Previously, we had the redeclaration chain but built it too late to be useful, because... - Teach instantiation of static data member definitions not to try to check an initializer if a previous declaration already had an initializer. This makes sure that we don't complain about static const data members with in-class initializers and out-of-line definitions. - Move all of the incomplete-type checking logic out of Sema::FinalizeDeclaratorGroup; it makes more sense in ActOnUnitializedDecl. There may still be a few places where we can improve these diagnostics. I'll address that as a separate commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95657 91177308-0d34-0410-b5e6-96231b3b80d8
emp.mem/p5.cpp
|
220ccbf2c9ef97034cce80561f9f46c4f1f63bc7 |
13-Jan-2010 |
John McCall <rjmccall@apple.com> |
Improve the reporting of non-viable overload candidates by noting the reason why the candidate is non-viable. There's a lot we can do to improve this, but it's a good start. Further improvements should probably be integrated with the bad-initialization reporting routines. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93277 91177308-0d34-0410-b5e6-96231b3b80d8
emp.class/temp.static/p1-inst.cpp
emp.class/temp.static/p1.cpp
|
9791bdc9b67435376f0b65686b627f5b3c6d1869 |
11-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Test case for naming of conversion function template specializations git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93177 91177308-0d34-0410-b5e6-96231b3b80d8
emp.mem/p5.cpp
|
b1622a1fd7b7f4ab8d00d0183d17c90ad25c14e3 |
06-Jan-2010 |
John McCall <rjmccall@apple.com> |
Improve the diagnostics used to report implicitly-generated class members as parts of overload sets. Also, refer to constructors as 'constructors' rather than functions. Adjust a lot of tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92832 91177308-0d34-0410-b5e6-96231b3b80d8
emp.class/temp.static/p1-inst.cpp
emp.class/temp.static/p1.cpp
|
7abfbdbc97ad8e7f340789f751df1e32b10118b4 |
19-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Switch more of Sema::CheckInitializerTypes over to InitializationSequence. Specially, switch initialization of a C++ class type (either copy- or direct-initialization). Also, make sure that we create an elidable copy-construction when performing copy initialization of a C++ class variable. Fixes PR5826. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91750 91177308-0d34-0410-b5e6-96231b3b80d8
emp.class/temp.static/p1-inst.cpp
emp.class/temp.static/p1.cpp
|
18ef5e28a9a2677f8b1dce1fb2638d66e0a1621f |
18-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Switch the initialization required by return statements over to the new InitializationSequence. This fixes some bugs (e.g., PR5808), changed some diagnostics, and caused more churn than expected. What's new: - InitializationSequence now has a "C conversion sequence" category and step kind, which falls back to - Changed the diagnostics for returns to always have the result type of the function first and the type of the expression second. CheckSingleAssignmentConstraints to peform checking in C. - Improved ASTs for initialization of return values. The ASTs now capture all of the temporaries we need to create, but intentionally do not bind the tempoary that is actually returned, so that it won't get destroyed twice. - Make sure to perform an (elidable!) copy of the class object that is returned from a class. - Fix copy elision in CodeGen to properly see through the subexpressions that occur with elidable copies. - Give "new" its own entity kind; as with return values and thrown objects, we don't bind the expression so we don't call a destructor for it. Note that, with this patch, I've broken returning move-only types in C++0x. We'll fix it later, when we tackle NRVO. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91669 91177308-0d34-0410-b5e6-96231b3b80d8
emp.class/temp.static/p1.cpp
|
a5728872c7702ddd09537c95bc3cbd20e1f2fb09 |
15-Dec-2009 |
Daniel Dunbar <daniel@zuster.org> |
Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91446 91177308-0d34-0410-b5e6-96231b3b80d8
emp.class.spec/p6.cpp
emp.class.spec/temp.class.order/p2.cpp
emp.class.spec/temp.class.spec.mfunc/p1-neg.cpp
emp.class.spec/temp.class.spec.mfunc/p1.cpp
emp.class/temp.mem.class/p1.cpp
emp.class/temp.mem.func/p1-retmem.cpp
emp.class/temp.mem.func/p1.cpp
emp.class/temp.mem.func/p1inst.cpp
emp.class/temp.mem.func/pr5056.cpp
emp.class/temp.static/p1-inst.cpp
emp.class/temp.static/p1.cpp
emp.fct/temp.func.order/p4.cpp
emp.fct/temp.func.order/p5.cpp
emp.fct/temp.over.link/p4-neg.cpp
emp.fct/temp.over.link/p4.cpp
emp.fct/temp.over.link/p6.cpp
emp.friend/p1.cpp
emp.friend/p3.cpp
emp.friend/p5.cpp
emp.mem/p1.cpp
|
74295b3408178bd0e97c2090dac911817778b582 |
23-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Canonical template arguments that are template template parameters by their template parameter depth and position, so that we can match redeclarations appropriately. Fixes PR5527 and PR5528. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89654 91177308-0d34-0410-b5e6-96231b3b80d8
emp.class/temp.mem.func/p1.cpp
|
a481edb1b11c956a46cb42cd0dc4dd9851c10801 |
21-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Cope with extraneous "template" keyword when providing an out-of-line definition of a member template (or a member thereof). Fixes PR5566. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89512 91177308-0d34-0410-b5e6-96231b3b80d8
emp.class.spec/temp.class.spec.mfunc/p1.cpp
emp.class/temp.mem.func/p1.cpp
|
e8c01bdb56549adcecd71ce39160eea54b2c51c8 |
30-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Instantiate class template friends better; fixes PR5332. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85612 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p5.cpp
|
ed9c0f90b7e0811c209b95e39fe07c211c531285 |
29-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement support for semantic checking and template instantiation of class template partial specializations of member templates. Also, fixes a silly little bug in the marking of "used" template parameters in member templates. Fixes PR5236. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85447 91177308-0d34-0410-b5e6-96231b3b80d8
emp.class.spec/p6.cpp
|
7974c3b7062f85bb7c0ada34526cdefe1d30f89b |
07-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Class template partial specializations can be declared anywhere that its definition may be defined, including in a class. Also, put in an assertion when trying to instantiate a class template partial specialization of a member template, which is not yet implemented. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83469 91177308-0d34-0410-b5e6-96231b3b80d8
emp.class.spec/p6.cpp
|
d04b1be7d3015a307f93eea0b9ab0ecce612951e |
28-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Make sure that out-of-line function and variable definitions are not pushed into scope. Fixes PR5056. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83003 91177308-0d34-0410-b5e6-96231b3b80d8
emp.class/temp.mem.func/pr5056.cpp
|
d85bea2affdd59d83d1be7d24b97f436484c3625 |
26-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Rework the Parse-Sema interaction for friends to better support friend class templates. We now treat friend class templates much more like normal class templates, except that they still get special name lookup rules. Fixes PR5057 and eliminates a bunch of spurious diagnostics in <iostream>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82848 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p3.cpp
|
dd4a3b0065b9a7e7b00073df415a798886c090f3 |
17-Sep-2009 |
John McCall <rjmccall@apple.com> |
Improved representation and support for friend class templates. Angst about same. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82088 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p3.cpp
emp.friend/p5.cpp
|
9eea08ba72f8b1e7faf38e43376b9157fc4a2af2 |
15-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Slightly improved template argument deduction for use in partial ordering, along with another test case for partial ordering of partial specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81869 91177308-0d34-0410-b5e6-96231b3b80d8
emp.class.spec/temp.class.order/p2.cpp
|
05b23ea2119b4c411719bd6631e5d679ba5e7ef1 |
14-Sep-2009 |
John McCall <rjmccall@apple.com> |
Skeletal support for friend class templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81801 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p5.cpp
|
8a51491d936d8c50480f3c3ca6647be12a7ad51f |
14-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement partial ordering of function template specializations (C++ [temp.func.order]). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81777 91177308-0d34-0410-b5e6-96231b3b80d8
emp.fct/temp.func.order/p4.cpp
emp.fct/temp.func.order/p5.cpp
|
6b2becfc434b0bdced8560802c4d0e03148c61b8 |
08-Sep-2009 |
John McCall <rjmccall@apple.com> |
Support templateids in friend declarations. Fixes bug 4859. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81233 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p1.cpp
|
82b9fb8e7a05066e690670d2eb386a624b04f684 |
02-Sep-2009 |
John McCall <rjmccall@apple.com> |
Borrow a friend class's previous declaration's access specifier regardless of whether the current context is dependent. Thanks to Anders for pointing this out. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80828 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p1.cpp
|
1a26c27eba32f8766c0eeec73fe43634cd814825 |
02-Sep-2009 |
John McCall <rjmccall@apple.com> |
Fix a little crasher in friend decls. Thanks again to Eli for finding this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80748 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p1.cpp
|
2a29c4b6ef710de49b1fd72902d6930033edae24 |
29-Aug-2009 |
John McCall <rjmccall@apple.com> |
Fix a last-minute typo and make the test not emit temporaries. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80419 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p1.cpp
|
f181d8a44f5837213eeaee6d71f584b1ab2849cd |
29-Aug-2009 |
John McCall <rjmccall@apple.com> |
Ensure code generation for friend declarations in class templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80418 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p1.cpp
|
02cace78cf48cc26686bd5b07c78606abca13bcd |
28-Aug-2009 |
John McCall <rjmccall@apple.com> |
Omnibus friend decl refactoring. Instead of cloning AST classes for friend declarations of same, introduce a single AST class and add appropriate bits (encoded in the namespace) for whether a decl is "real" or not. Much hackery about previously-declared / not-previously-declared, but it's essentially mandated by the standard that friends alter lookup, and this is at least fairly non-intrusive. Refactor the Sema methods specific to friends for cleaner flow and less nesting. Incidentally solve a few bugs, but I remain confident that we can put them back. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80353 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p1.cpp
|
6dd38daf1495367db8fe9e9a5cacb7420cf08e27 |
27-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
When checking whether one declaration context encloses another, make sure to look at the primary contexts. Thanks to Eli for the test case git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80212 91177308-0d34-0410-b5e6-96231b3b80d8
emp.class/temp.mem.func/p1.cpp
|
dacd434c49658286c380c7b4c357d76d53cb4aa1 |
26-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve diagnostics and recovery when the nested-name-specifier of a qualified name does not actually refer into a class/class template/class template partial specialization. Improve printing of nested-name-specifiers to eliminate redudant qualifiers. Also, make it possible to output a nested-name-specifier through a DiagnosticBuilder, although there are relatively few places that will use this leeway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80056 91177308-0d34-0410-b5e6-96231b3b80d8
emp.class/temp.mem.func/p1.cpp
|
06c0f5b1bb1623a93a2bc4c345fb3be52a2b22a7 |
23-Aug-2009 |
Chris Lattner <sabre@nondot.org> |
Eli points out that we really must diagnose "void* > 0" as an extension. Explicitly add it as an EXTENSION instead of an EXTWARN so that it only comes out with -pedantic. Thanks Eli! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79791 91177308-0d34-0410-b5e6-96231b3b80d8
emp.class.spec/temp.class.spec.mfunc/p1.cpp
|
17e32f30e2d1eaf6639d3d4e2196a8d7c709fbac |
22-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Refactor instantiation of destructors to use the common CXXMethodDecl code, fixing a problem where instantiations of out-of-line destructor definitions would had the wrong lexical context. Introduce tests for out-of-line definitions of the constructors, destructors, and conversion functions of a class template partial specialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79682 91177308-0d34-0410-b5e6-96231b3b80d8
emp.class.spec/temp.class.spec.mfunc/p1.cpp
|
1cbc6b044fac411ed97c2c97b6873439ac048c91 |
22-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Add test for out-of-line definition of a conversion function git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79679 91177308-0d34-0410-b5e6-96231b3b80d8
emp.class/temp.mem.func/p1.cpp
|
ac373c4ca596a144d906570f284d46d702e10719 |
22-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix parsing for out-of-line definitions of constructors and destructors of class templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79678 91177308-0d34-0410-b5e6-96231b3b80d8
emp.class/temp.mem.func/p1.cpp
|
e29ba20148e9b7835ad463b39cd4ee9223eafbbf |
20-Aug-2009 |
John McCall <rjmccall@apple.com> |
Basic nested-template implementation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79504 91177308-0d34-0410-b5e6-96231b3b80d8
emp.mem/p1.cpp
|
fd810b1386ed29b250e7d522ea826a65c815e49d |
14-Aug-2009 |
John McCall <rjmccall@apple.com> |
Support friend declarations in templates and test that argdep lookup still works. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78979 91177308-0d34-0410-b5e6-96231b3b80d8
emp.friend/p1.cpp
|
4a959d8788179d654df6b213b08d2b064989211d |
06-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
When we encounter a dependent type that was parsed before we know that we were going to enter into the scope of a class template or class template partial specialization, rebuild that type so that it can refer to members of the current instantiation, as in code like template<typename T> struct X { typedef T* pointer; pointer data(); }; template<typename T> typename X<T>::pointer X<T>::data() { ... } Without rebuilding the return type of this out-of-line definition, the canonical return type of the out-of-line definition (a TypenameType) will not match the canonical return type of the declaration (the canonical type of T*). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78316 91177308-0d34-0410-b5e6-96231b3b80d8
emp.class/temp.mem.func/p1-retmem.cpp
|
211c278e536b9f5bf468a99dc24449ad734466fe |
31-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Make the recanonicalization-for-an-out-of-line-definition test case a bit trickier git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77707 91177308-0d34-0410-b5e6-96231b3b80d8
emp.class/temp.mem.func/p1-retmem.cpp
|
b88e888404ad0a2bdd9bfae457e8530bb38a87c5 |
30-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Support out-of-line definitions of the members of class template partial specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77606 91177308-0d34-0410-b5e6-96231b3b80d8
emp.class.spec/temp.class.spec.mfunc/p1-neg.cpp
emp.class.spec/temp.class.spec.mfunc/p1.cpp
|
828e226ab7ed08b3eb766549e9d3306432137460 |
29-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Use the new statement/expression profiling code to unique dependent template arguments, as in template specialization types. This permits matching out-of-line definitions of members for class templates that involve non-type template parameters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77462 91177308-0d34-0410-b5e6-96231b3b80d8
emp.fct/temp.over.link/p6.cpp
|
8bda2e66fa8050a6b3eef745628873eef4b683d8 |
28-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Add a template test that requires canonical expression comparison git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77325 91177308-0d34-0410-b5e6-96231b3b80d8
emp.fct/temp.over.link/p6.cpp
|
bc0a2226c7fcd18b29b6846049e2cfcb872d3593 |
27-Jul-2009 |
Owen Anderson <resistor@mac.com> |
Update for LLVM API change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77249 91177308-0d34-0410-b5e6-96231b3b80d8
emp.class/temp.mem.class/p1.cpp
emp.class/temp.mem.func/p1-retmem.cpp
emp.class/temp.mem.func/p1inst.cpp
emp.class/temp.static/p1-inst.cpp
emp.class/temp.static/p1.cpp
|
7caa6825f42a0f7e97d6fc06233133c42b218e46 |
24-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for static data members that are defined out-of-line. Note that this also fixes a bug that affects non-template code, where we were not treating out-of-line static data members are "file-scope" variables, and therefore not checking their initializers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77002 91177308-0d34-0410-b5e6-96231b3b80d8
emp.class/temp.static/p1-inst.cpp
emp.class/temp.static/p1.cpp
|
7cdbc5832084f45721693dfb1d93284c3e08efee |
23-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement support for out-of-line definitions of the class members of class templates, e.g., template<typename T> struct Outer { struct Inner; }; template<typename T> struct Outer<T>::Inner { // ... }; Implementing this feature required some extensions to ActOnTag, which now takes a set of template parameter lists, and is the precursor to removing the ActOnClassTemplate function from the parser Action interface. The reason for this approach is simple: the parser cannot tell the difference between a class template definition and the definition of a member of a class template; both have template parameter lists, and semantic analysis determines what that template parameter list means. There is still some cleanup to do with ActOnTag and ActOnClassTemplate. This commit provides the basic functionality we need, however. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76820 91177308-0d34-0410-b5e6-96231b3b80d8
emp.class/temp.mem.class/p1.cpp
|
dfe3f2d8ba49f03d01f42570e640d9a6755e6c08 |
22-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement parsing and semantic analysis for out-of-line definitions of static data members of class templates. We don't instantiate the definitions yet, however. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76756 91177308-0d34-0410-b5e6-96231b3b80d8
emp.class/temp.static/p1.cpp
|
5c7e281d368601858f9f5e5fe11734eea10b9523 |
22-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Test template instantiation for member functions of class templates defined out of line. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76740 91177308-0d34-0410-b5e6-96231b3b80d8
emp.class/temp.mem.func/p1inst.cpp
|
7551c183e8d788b5254e9c6f8bd8d719cea47da8 |
22-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Complain if we're entering the context of a dependent nested-name-specifier but cannot match that nested-name-specifier to a class template or class template partial specialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76704 91177308-0d34-0410-b5e6-96231b3b80d8
emp.class/temp.mem.func/p1.cpp
|
f59a56e180bf54528d7d1d5afa68fcc13300965a |
22-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Basic parsing and semantic analysis for out-of-line definitions of the member functions of class templates, e.g., template<typename T> struct X { void f(T); }; template<typename T> X<T>::f(T) { /* ... */ } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76692 91177308-0d34-0410-b5e6-96231b3b80d8
emp.class/temp.mem.func/p1-retmem.cpp
emp.class/temp.mem.func/p1.cpp
|
cb077fc8e0d440f024bbdf57983b84b6d658b60b |
21-Jul-2009 |
Mike Stump <mrs@apple.com> |
Prep for new warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76640 91177308-0d34-0410-b5e6-96231b3b80d8
emp.fct/temp.over.link/p4-neg.cpp
|
34d1dc9f0ca8f5b0528a8cd29f1addfe096361b8 |
24-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement matching of function templates, so that one can declare overloaded function templates. C++ [temp.over.link] paragraphs 4-8. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74079 91177308-0d34-0410-b5e6-96231b3b80d8
emp.fct/temp.over.link/p4-neg.cpp
emp.fct/temp.over.link/p4.cpp
|