[llvm-branch-commits] [cfe-branch] r127751 - in /cfe/branches/release_29: ./ include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp test/CXX/temp/temp.spec/temp.expl.spec/p2.cpp test/SemaCXX/warn-unreachable.cpp

Bill Wendling isanbard at gmail.com
Wed Mar 16 12:54:48 PDT 2011


Author: void
Date: Wed Mar 16 14:54:48 2011
New Revision: 127751

URL: http://llvm.org/viewvc/llvm-project?rev=127751&view=rev
Log:
--- Merging r127373 into '.':
U    test/CXX/temp/temp.spec/temp.expl.spec/p2.cpp
U    include/clang/Basic/DiagnosticSemaKinds.td
U    lib/Sema/SemaDecl.cpp


Modified:
    cfe/branches/release_29/   (props changed)
    cfe/branches/release_29/include/clang/Basic/DiagnosticSemaKinds.td
    cfe/branches/release_29/lib/Sema/SemaDecl.cpp
    cfe/branches/release_29/test/CXX/temp/temp.spec/temp.expl.spec/p2.cpp
    cfe/branches/release_29/test/SemaCXX/warn-unreachable.cpp   (props changed)

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

Modified: cfe/branches/release_29/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_29/include/clang/Basic/DiagnosticSemaKinds.td?rev=127751&r1=127750&r2=127751&view=diff
==============================================================================
--- cfe/branches/release_29/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/branches/release_29/include/clang/Basic/DiagnosticSemaKinds.td Wed Mar 16 14:54:48 2011
@@ -1723,8 +1723,6 @@
 def err_not_class_template_specialization : Error<
   "cannot specialize a %select{dependent template|template template "
   "parameter}0">;
-def err_function_specialization_in_class : Error<
-  "cannot specialize a function %0 within class scope">;
 
 // C++ class template specializations and out-of-line definitions
 def err_template_spec_needs_header : Error<

Modified: cfe/branches/release_29/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_29/lib/Sema/SemaDecl.cpp?rev=127751&r1=127750&r2=127751&view=diff
==============================================================================
--- cfe/branches/release_29/lib/Sema/SemaDecl.cpp (original)
+++ cfe/branches/release_29/lib/Sema/SemaDecl.cpp Wed Mar 16 14:54:48 2011
@@ -4067,14 +4067,9 @@
                                                        Previous))
         NewFD->setInvalidDecl();
     } else if (isFunctionTemplateSpecialization) {
-      if (CurContext->isDependentContext() && CurContext->isRecord()) {
-        Diag(NewFD->getLocation(), diag::err_function_specialization_in_class)
-          << NewFD->getDeclName();
-        NewFD->setInvalidDecl();
-        return 0;
-      } else if (CheckFunctionTemplateSpecialization(NewFD,
-                                  (HasExplicitTemplateArgs ? &TemplateArgs : 0),
-                                                     Previous))
+      if (CheckFunctionTemplateSpecialization(NewFD,
+                                              (HasExplicitTemplateArgs ? &TemplateArgs : 0),
+                                              Previous))
         NewFD->setInvalidDecl();
     } else if (isExplicitSpecialization && isa<CXXMethodDecl>(NewFD)) {
       if (CheckMemberSpecialization(NewFD, Previous))

Modified: cfe/branches/release_29/test/CXX/temp/temp.spec/temp.expl.spec/p2.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_29/test/CXX/temp/temp.spec/temp.expl.spec/p2.cpp?rev=127751&r1=127750&r2=127751&view=diff
==============================================================================
--- cfe/branches/release_29/test/CXX/temp/temp.spec/temp.expl.spec/p2.cpp (original)
+++ cfe/branches/release_29/test/CXX/temp/temp.spec/temp.expl.spec/p2.cpp Wed Mar 16 14:54:48 2011
@@ -237,15 +237,3 @@
   xvp.ft1(vp, i);
   xvp.ft1(vp, u);
 }
-
-namespace PR8979 {
-  template<typename Z>
-  struct X0 {
-    template <class T, class U> class Inner;
-    struct OtherInner;
-    template<typename T, typename U> void f(Inner<T, U>&);
-
-    typedef Inner<OtherInner, OtherInner> MyInner;
-    template<> void f(MyInner&); // expected-error{{cannot specialize a function 'f' within class scope}}
-  };
-}

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





More information about the llvm-branch-commits mailing list