[llvm-branch-commits] [cfe-branch] r127750 - in /cfe/branches/release_29: ./ lib/Sema/SemaTemplate.cpp test/SemaCXX/warn-unreachable.cpp test/SemaTemplate/nested-name-spec-template.cpp

Bill Wendling isanbard at gmail.com
Wed Mar 16 12:47:06 PDT 2011


Author: void
Date: Wed Mar 16 14:47:06 2011
New Revision: 127750

URL: http://llvm.org/viewvc/llvm-project?rev=127750&view=rev
Log:
--- Merging r127512 into '.':
U    test/SemaTemplate/nested-name-spec-template.cpp
U    lib/Sema/SemaTemplate.cpp


Modified:
    cfe/branches/release_29/   (props changed)
    cfe/branches/release_29/lib/Sema/SemaTemplate.cpp
    cfe/branches/release_29/test/SemaCXX/warn-unreachable.cpp   (props changed)
    cfe/branches/release_29/test/SemaTemplate/nested-name-spec-template.cpp

Propchange: cfe/branches/release_29/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Mar 16 14:47:06 2011
@@ -1,2 +1,2 @@
-/cfe/trunk:127283,127308,127326,127460,127541,127543,127563
+/cfe/trunk:127283,127308,127326,127460,127512,127541,127543,127563
 /cfe/trunk/test/SemaTemplate:126920

Modified: cfe/branches/release_29/lib/Sema/SemaTemplate.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_29/lib/Sema/SemaTemplate.cpp?rev=127750&r1=127749&r2=127750&view=diff
==============================================================================
--- cfe/branches/release_29/lib/Sema/SemaTemplate.cpp (original)
+++ cfe/branches/release_29/lib/Sema/SemaTemplate.cpp Wed Mar 16 14:47:06 2011
@@ -2028,7 +2028,8 @@
                                           MemberOfUnknownSpecialization);
     if (TNK == TNK_Non_template && LookupCtx->isDependentContext() &&
         isa<CXXRecordDecl>(LookupCtx) &&
-        cast<CXXRecordDecl>(LookupCtx)->hasAnyDependentBases()) {
+        (!cast<CXXRecordDecl>(LookupCtx)->hasDefinition() ||
+         cast<CXXRecordDecl>(LookupCtx)->hasAnyDependentBases())) {
       // This is a dependent template. Handle it below.
     } else if (TNK == TNK_Non_template) {
       Diag(Name.getSourceRange().getBegin(),

Propchange: cfe/branches/release_29/test/SemaCXX/warn-unreachable.cpp
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Mar 16 14:47:06 2011
@@ -1 +1 @@
-/cfe/trunk/test/SemaCXX/warn-unreachable.cpp:121961,127283,127308,127326,127460,127541,127543,127563
+/cfe/trunk/test/SemaCXX/warn-unreachable.cpp:121961,127283,127308,127326,127460,127512,127541,127543,127563

Modified: cfe/branches/release_29/test/SemaTemplate/nested-name-spec-template.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_29/test/SemaTemplate/nested-name-spec-template.cpp?rev=127750&r1=127749&r2=127750&view=diff
==============================================================================
--- cfe/branches/release_29/test/SemaTemplate/nested-name-spec-template.cpp (original)
+++ cfe/branches/release_29/test/SemaTemplate/nested-name-spec-template.cpp Wed Mar 16 14:47:06 2011
@@ -127,3 +127,16 @@
 
   Y<X, int> yxi; // expected-note{{in instantiation of template class 'PR9226::Y<PR9226::X, int>' requested here}}
 }
+
+namespace PR9449 {
+  template <typename T>
+  struct s; // expected-note{{template is declared here}}
+
+  template <typename T>
+  void f() {
+    int s<T>::template n<T>::* f; // expected-error{{implicit instantiation of undefined template 'PR9449::s<int>'}} \
+    // expected-error{{following the 'template' keyword}}
+  }
+
+  template void f<int>(); // expected-note{{in instantiation of}}
+}





More information about the llvm-branch-commits mailing list