[cfe-commits] r102065 - in /cfe/trunk: lib/Sema/SemaType.cpp test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p1.cpp

Douglas Gregor dgregor at apple.com
Thu Apr 22 07:24:35 PDT 2010


Author: dgregor
Date: Thu Apr 22 09:24:35 2010
New Revision: 102065

URL: http://llvm.org/viewvc/llvm-project?rev=102065&view=rev
Log:
Record nested-name-specifiers of when we create
elaborated-type-specifiers. Patch by Enea Zaffanella!

Modified:
    cfe/trunk/lib/Sema/SemaType.cpp
    cfe/trunk/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p1.cpp

Modified: cfe/trunk/lib/Sema/SemaType.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaType.cpp?rev=102065&r1=102064&r2=102065&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaType.cpp (original)
+++ cfe/trunk/lib/Sema/SemaType.cpp Thu Apr 22 09:24:35 2010
@@ -280,6 +280,7 @@
     if (TheSema.getLangOptions().CPlusPlus) {
       TagDecl::TagKind Tag
         = TagDecl::getTagKindForTypeSpec(DS.getTypeSpecType());
+      Result = TheSema.getQualifiedNameType(DS.getTypeSpecScope(), Result);
       Result = Context.getElaboratedType(Result, Tag);
     }
 

Modified: cfe/trunk/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p1.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p1.cpp?rev=102065&r1=102064&r2=102065&view=diff
==============================================================================
--- cfe/trunk/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p1.cpp (original)
+++ cfe/trunk/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p1.cpp Thu Apr 22 09:24:35 2010
@@ -39,7 +39,7 @@
       test<2> _1 = (foo)(a);
 
       class Test0::foo b;
-      test<2> _2 = (foo)(b); // expected-error {{no viable conversion from 'class Test0::foo' to 'class foo' is possible}}
+      test<2> _2 = (foo)(b); // expected-error {{no viable conversion from 'class Test0::foo' to 'class ::foo' is possible}}
     }
   }
 }





More information about the cfe-commits mailing list