]> granicus.if.org Git - clang/commitdiff
Fix PCH support for UnresolvedUsingTypenameDecl and UnresolvedUsingValueDecl.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Wed, 30 Jun 2010 08:49:30 +0000 (08:49 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Wed, 30 Jun 2010 08:49:30 +0000 (08:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107268 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/PCHReaderDecl.cpp
lib/Frontend/PCHWriterDecl.cpp
test/PCH/cxx-templates.h

index 9f057b0c1dc318e7b4b0c9fd7e1c1587f5c1ecab..120596ba823a2bf4a4cb7f853f4e01572b8ac4ca 100644 (file)
@@ -48,7 +48,7 @@ namespace clang {
     void VisitNamespaceAliasDecl(NamespaceAliasDecl *D);
     void VisitTypeDecl(TypeDecl *TD);
     void VisitTypedefDecl(TypedefDecl *TD);
-    void VisitUnresolvedUsingTypename(UnresolvedUsingTypenameDecl *D);
+    void VisitUnresolvedUsingTypenameDecl(UnresolvedUsingTypenameDecl *D);
     void VisitTagDecl(TagDecl *TD);
     void VisitEnumDecl(EnumDecl *ED);
     void VisitRecordDecl(RecordDecl *RD);
@@ -60,7 +60,7 @@ namespace clang {
     void VisitTemplateTypeParmDecl(TemplateTypeParmDecl *D);
     void VisitValueDecl(ValueDecl *VD);
     void VisitEnumConstantDecl(EnumConstantDecl *ECD);
-    void VisitUnresolvedUsingValue(UnresolvedUsingValueDecl *D);
+    void VisitUnresolvedUsingValueDecl(UnresolvedUsingValueDecl *D);
     void VisitDeclaratorDecl(DeclaratorDecl *DD);
     void VisitFunctionDecl(FunctionDecl *FD);
     void VisitCXXMethodDecl(CXXMethodDecl *D);
@@ -605,14 +605,14 @@ void PCHDeclReader::VisitUsingDirectiveDecl(UsingDirectiveDecl *D) {
                                                 Reader.GetDecl(Record[Idx++])));
 }
 
-void PCHDeclReader::VisitUnresolvedUsingValue(UnresolvedUsingValueDecl *D) {
+void PCHDeclReader::VisitUnresolvedUsingValueDecl(UnresolvedUsingValueDecl *D) {
   VisitValueDecl(D);
   D->setTargetNestedNameRange(Reader.ReadSourceRange(Record, Idx));
   D->setUsingLoc(Reader.ReadSourceLocation(Record, Idx));
   D->setTargetNestedNameSpecifier(Reader.ReadNestedNameSpecifier(Record, Idx));
 }
 
-void PCHDeclReader::VisitUnresolvedUsingTypename(
+void PCHDeclReader::VisitUnresolvedUsingTypenameDecl(
                                                UnresolvedUsingTypenameDecl *D) {
   VisitTypeDecl(D);
   D->setTargetNestedNameRange(Reader.ReadSourceRange(Record, Idx));
index 309cc3536d9baa0e99d6e266b61fe78f068b1bc0..29bbae23aeaf67b9f2a4b01374170076dd7b4949 100644 (file)
@@ -49,7 +49,7 @@ namespace clang {
     void VisitNamespaceAliasDecl(NamespaceAliasDecl *D);
     void VisitTypeDecl(TypeDecl *D);
     void VisitTypedefDecl(TypedefDecl *D);
-    void VisitUnresolvedUsingTypename(UnresolvedUsingTypenameDecl *D);
+    void VisitUnresolvedUsingTypenameDecl(UnresolvedUsingTypenameDecl *D);
     void VisitTagDecl(TagDecl *D);
     void VisitEnumDecl(EnumDecl *D);
     void VisitRecordDecl(RecordDecl *D);
@@ -61,7 +61,7 @@ namespace clang {
     void VisitTemplateTypeParmDecl(TemplateTypeParmDecl *D);
     void VisitValueDecl(ValueDecl *D);
     void VisitEnumConstantDecl(EnumConstantDecl *D);
-    void VisitUnresolvedUsingValue(UnresolvedUsingValueDecl *D);
+    void VisitUnresolvedUsingValueDecl(UnresolvedUsingValueDecl *D);
     void VisitDeclaratorDecl(DeclaratorDecl *D);
     void VisitFunctionDecl(FunctionDecl *D);
     void VisitCXXMethodDecl(CXXMethodDecl *D);
@@ -610,7 +610,7 @@ void PCHDeclWriter::VisitUsingDirectiveDecl(UsingDirectiveDecl *D) {
   Code = pch::DECL_USING_DIRECTIVE;
 }
 
-void PCHDeclWriter::VisitUnresolvedUsingValue(UnresolvedUsingValueDecl *D) {
+void PCHDeclWriter::VisitUnresolvedUsingValueDecl(UnresolvedUsingValueDecl *D) {
   VisitValueDecl(D);
   Writer.AddSourceRange(D->getTargetNestedNameRange(), Record);
   Writer.AddSourceLocation(D->getUsingLoc(), Record);
@@ -618,7 +618,7 @@ void PCHDeclWriter::VisitUnresolvedUsingValue(UnresolvedUsingValueDecl *D) {
   Code = pch::DECL_UNRESOLVED_USING_VALUE;
 }
 
-void PCHDeclWriter::VisitUnresolvedUsingTypename(
+void PCHDeclWriter::VisitUnresolvedUsingTypenameDecl(
                                                UnresolvedUsingTypenameDecl *D) {
   VisitTypeDecl(D);
   Writer.AddSourceRange(D->getTargetNestedNameRange(), Record);
index c089e1c5a9bcef7613849dc39c0d2a07f28e52bd..b562f471f862b9073ce49b1330c808d17b55ab5f 100644 (file)
@@ -55,3 +55,13 @@ inline T make_a(const A1& a1) {
   T::depend_declref();
   return T(a1);
 }
+
+template <class T> class UseBase {
+  void foo();
+  typedef int bar;
+};
+
+template <class T> class UseA : public UseBase<T> {
+  using UseBase<T>::foo;
+  using typename UseBase<T>::bar; 
+};