Hi Richard, Have you had time to look at this?
http://lab.llvm.org:8011/builders/clang-native-arm-cortex-a9/builds/21803 cheers, --renato On 18 September 2014 01:12, Richard Smith <[email protected]> wrote: > Author: rsmith > Date: Wed Sep 17 19:12:09 2014 > New Revision: 217997 > > URL: http://llvm.org/viewvc/llvm-project?rev=217997&view=rev > Log: > Skip parens when detecting whether we're instantiating a function declaration. > > Modified: > cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp > cfe/trunk/test/SemaTemplate/instantiate-exception-spec-cxx11.cpp > > Modified: cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp?rev=217997&r1=217996&r2=217997&view=diff > ============================================================================== > --- cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp (original) > +++ cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp Wed Sep 17 19:12:09 2014 > @@ -1577,8 +1577,8 @@ TypeSourceInfo *Sema::SubstFunctionDeclT > > QualType Result; > > - // FIXME: What if the function type is parenthesized? > - if (FunctionProtoTypeLoc Proto = TL.getAs<FunctionProtoTypeLoc>()) { > + if (FunctionProtoTypeLoc Proto = > + TL.IgnoreParens().getAs<FunctionProtoTypeLoc>()) { > // Instantiate the type, other than its exception specification. The > // exception specification is instantiated in InitFunctionInstantiation > // once we've built the FunctionDecl. > > Modified: cfe/trunk/test/SemaTemplate/instantiate-exception-spec-cxx11.cpp > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/instantiate-exception-spec-cxx11.cpp?rev=217997&r1=217996&r2=217997&view=diff > ============================================================================== > --- cfe/trunk/test/SemaTemplate/instantiate-exception-spec-cxx11.cpp > (original) > +++ cfe/trunk/test/SemaTemplate/instantiate-exception-spec-cxx11.cpp Wed Sep > 17 19:12:09 2014 > @@ -58,6 +58,13 @@ namespace dr1330_example { > S().f<S>(); // ok > S().f<int>(); // expected-note {{instantiation of exception spec}} > } > + > + template<typename T> > + struct U { > + void f() noexcept(T::error); > + void (g)() noexcept(T::error); > + }; > + U<int> uint; // ok > } > > namespace core_19754_example { > > > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
