[cfe-commits] r67723 - in /cfe/trunk: include/clang/Parse/Action.h include/clang/Parse/Parser.h lib/Parse/ParseDeclCXX.cpp lib/Parse/ParseTemplate.cpp lib/Parse/Parser.cpp lib/Sema/Sema.h lib/Sema/SemaTemplate.cpp

Piotr Rak piotr.rak at gmail.com
Thu Mar 26 09:52:21 PDT 2009


Hi,

2009/3/26 Anders Carlsson <andersca at mac.com>:
>
> On Mar 25, 2009, at 6:01 PM, Douglas Gregor wrote:
>
>> Mar 25, 2009, at 5:52 PM, Anders Carlsson <andersca at mac.com> wrote:
>>
>>> Author: andersca
>>> Date: Wed Mar 25 19:52:18 2009
>>> New Revision: 67723
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=67723&view=rev
>>> Log:
>>> Handle parsing of templates in member declarations. Pass the
>>> AccessSpecifier all the way down to ActOnClassTemplate.
>>>
>>> Doug, Sebastian: Plz review! :)
>>
>> This looks fine to me. Do you have a test case to commit?
>
> I just checked in an access specifier test that has a nested template.
>
> However, I don't think nested templates are 100% working:
>
> class A;
>
> class S {
>     template<typename T> class A { };
> };
>
> t.cpp:4:32: error: redefinition of 'A' as different kind of symbol
>     template<typename T> class A { };
>                                ^
> t.cpp:1:7: note: previous definition is here
> class A;
>       ^
>
> Did I forget to push a decl context somwhere? :)

No, it just looks like you found bug in my patch inroducing
unqualified namespace lookup.
Sema::CppLookupName continues look in parent DeclContext even if
RedeclarationOnly is true!
Attached should fix it, fixes your example.

I am sorry about it.

Piotr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lookup-redeclaration-only-fix.diff
Type: text/x-patch
Size: 1504 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20090326/19e7bf63/attachment.bin>


More information about the cfe-commits mailing list