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
/external/clang/test/SemaTemplate/friend-template.cpp
|
e34db6b3e772e9832e1f6de1f23457076ffbec88 |
|
14-Mar-2013 |
John McCall <rjmccall@apple.com> |
Flag that friend function definitions are "late parsed" so that template instantiation will still consider them to be definitions if we instantiate the containing class before we get around to parsing the friend. This seems like a legitimate use of "late template parsed" to me, but I'd appreciate it if someone responsible for the MS feature would look over this. This file already appears to access AST nodes directly, which is arguably not kosher in the parser, but the performance of this path matters enough that perpetuating the sin is justifiable. Probably we ought to reconsider this policy for very simple manipulations like this. The reason this entire thing is necessary is that function template instantiation plays some very gross games in order to not associate an instantiated function template with the class it came from unless it's a definition, and the reason *that's* necessary is that the AST currently cannot represent the instantiation history of individual function template declarations, but instead tracks it in common for the entire function template. That probably prevents us from correctly reporting ill-formed calls to ambiguously instantiated friend function templates. rdar://12350696 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177003 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaTemplate/friend-template.cpp
|
6e21b16ab226959341b85e16060fd81f71cee628 |
|
22-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR12585: When processing a friend template inside a class template, don't pretend there was no previous declaration -- that can lead us to injecting a class template (with no access specifier) into a class scope. Instead, just avoid the problematic checks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155303 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaTemplate/friend-template.cpp
|
c93e014cd43b08812370cfc8ef7bb7b92305f8fb |
|
20-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Replace r155185 with a better fix, which also addresses PR12557. When looking up an elaborated type specifier in a friend declaration, only look for type declarations, per [basic.lookup.elab]p2. If we know that the redeclaration lookup for a friend class template in a dependent context finds a non-template, don't delay the diagnostic to instantiation time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155187 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaTemplate/friend-template.cpp
|
8b0fa5241a0416fc50dfbb7e38f20e777f191848 |
|
30-Mar-2012 |
Douglas Gregor <dgregor@apple.com> |
If we encounter a friend class template for which we cannot resolve the nested-name-specifier (e.g., because it is dependent), do not error even though we can't represent it in the AST at this point. This is a horrible, horrible hack. The actual feature we still need to implement (for C++98!) is covered by PR12292. However, we used to silently accept this code, so when we recently started rejecting it we caused some regressions (e.g., <rdar://problem/11147355>). This hack brings us back to the passable-but-not-good state we had previously. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153752 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaTemplate/friend-template.cpp
|
ba4ee9a9b6e4cffc12bb6b395a58b89c189bb07e |
|
20-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
When we parse something that looks like a templated friend tag but actually just has an extraneous 'template<>' header, strip off the 'template<>' header and treat it as a normal friend tag. Fixes PR10660 / <rdar://problem/9958322>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142587 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaTemplate/friend-template.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
/external/clang/test/SemaTemplate/friend-template.cpp
|
b2b5cc0cf908d516a107d373db963f692449a8a8 |
|
04-Jan-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Enhance the diagnostic for negative array sizes to include the declaration name of the array when present. This ensures that a poor-man's C++03 static_assert will include the user error message often embedded in the name. Update all the tests to reflect the new wording, and add a test for the name behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122802 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaTemplate/friend-template.cpp
|
b0ee93cf945744569b82b8a07361061f2963264a |
|
21-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
A class template partial specialization cannot be a friend. Fixes PR8649. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122325 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaTemplate/friend-template.cpp
|
e7089b0c6ffe8a8854150b60df00fb544099f77d |
|
04-May-2010 |
Douglas Gregor <dgregor@apple.com> |
When computing the template arguments for the instantiation of a friend function template, be sure to adjust the computed template argument lists based on the location of the definition of the function template: it's possible that the definition we're instantiating with and the template declaration that we found when creating the specialization are in different contexts, which meant that we would end up using the wrong template arguments for instantiation. Fixes PR7013; all Boost.DynamicBitset tests now pass. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102974 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaTemplate/friend-template.cpp
|
d4598a2cc7576c06f69d3cf64d0e2c9783ddf529 |
|
28-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
When instantiating a function template specialization following template argument deduction, use the lexical declaration context as the owner for friend function templates. Fixes 2 failures in Boost.Graph. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102489 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaTemplate/friend-template.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
/external/clang/test/SemaTemplate/friend-template.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
/external/clang/test/SemaTemplate/friend-template.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
/external/clang/test/SemaTemplate/friend-template.cpp
|
5d52e47ed6a4f920723ebec371594a3fe7878d7c |
|
16-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Partial fix for PR6022, where we were complaining when a friend function template declared within a class template did not match a function in another scope. We really need to rework how friends-in-templates are semantically checked. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93642 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaTemplate/friend-template.cpp
|
65c49466278f3739ac879f961b94b2aff744beed |
|
18-Dec-2009 |
John McCall <rjmccall@apple.com> |
Set up the semantic context correctly when declaring a friend class template. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91678 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaTemplate/friend-template.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
/external/clang/test/SemaTemplate/friend-template.cpp
|
e976ffe18ee60b81641423f42ff6feec2f5e3cb7 |
|
15-Dec-2009 |
John McCall <rjmccall@apple.com> |
Fix PR5716 by bandaging over the solution until we can come back to it. I apologize for friend declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91359 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaTemplate/friend-template.cpp
|
4b6e90a0dd98b13c2d3ac34ee3eae3954dbb87c6 |
|
11-Dec-2009 |
John McCall <rjmccall@apple.com> |
Reorganize testcase. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91153 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaTemplate/friend-template.cpp
|
259571e27e513cfaf691cc7447e09b31a47d5438 |
|
30-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
When a friend is declared in a dependent context, don't even try to match it up with a declaration in the outer scope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85628 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaTemplate/friend-template.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
/external/clang/test/SemaTemplate/friend-template.cpp
|
a735b206fdb5c15767a45289e1ffb3b568f70f2b |
|
13-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve the internal representation and semantic analysis of friend function templates. This commit ensures that friend function templates are constructed as FunctionTemplateDecls rather than partial FunctionDecls (as they previously were). It then implements template instantiation for friend function templates, injecting the friend function template only when no previous declaration exists at the time of instantiation. Oh, and make sure that explicit specialization declarations are not friends. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83970 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaTemplate/friend-template.cpp
|
d7e5bdb23c6ba2786cf94788c9af555e2c1276ce |
|
09-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
When declaring a friend class template, we may end up finding an injected-class-name (e.g., when we're referring to other specializations of the current class template). Make sure that we see the template rather than the injected-class-name. Fixes PR4768. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83672 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaTemplate/friend-template.cpp
|
182ddf0e5dc5667e6683a58b483a2e52564f4303 |
|
28-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve handling of friend function templates somewhat git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82950 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaTemplate/friend-template.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
/external/clang/test/SemaTemplate/friend-template.cpp
|