diff options
author | Hans Wennborg <hans@hanshq.net> | 2014-09-18 16:01:32 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2014-09-18 16:01:32 +0000 |
commit | e113c20c1d8834383c89ee395eb37887cd3919fe (patch) | |
tree | 9e6775c2d4e655b622ca637dcaa6b430324240a5 /clang/test/SemaTemplate/instantiate-exception-spec.cpp | |
parent | 6462f948847dc54ad498cb899fc8ec216a810bbd (diff) | |
download | bcm5719-llvm-e113c20c1d8834383c89ee395eb37887cd3919fe.tar.gz bcm5719-llvm-e113c20c1d8834383c89ee395eb37887cd3919fe.zip |
Revert r217995 and follow-ups:
r218053: Use exceptions() instead of getNumExceptions()/getExceptionType() to avoid
r218011: Work around MSVC parser bug by putting redundant braces around the body of
r217997: Skip parens when detecting whether we're instantiating a function declaration.
r217995: Instantiate exception specifications when instantiating function types (other
The Windows build was broken for 16 hours and no one had any good ideas of how to
fix it. Reverting for now to make the builders green. See the cfe-commits thread [1] for
more info.
This was the build error (from [2]):
C:\bb-win7\ninja-clang-i686-msc17-R\llvm-project\clang\lib\Sema\SemaTemplateInstantiate.cpp(1590) : error C2668: '`anonymous-namespace'::TemplateInstantiator::TransformFunctionProtoType' : ambiguous call to overloaded function
C:\bb-win7\ninja-clang-i686-msc17-R\llvm-project\clang\lib\Sema\SemaTemplateInstantiate.cpp(1313): could be 'clang::QualType `anonymous-namespace'::TemplateInstantiator::TransformFunctionProtoType<clang::Sema::SubstFunctionDeclType::<lambda_756edcbe7bd5c7584849a6e3a1491735>>(clang::TypeLocBuilder &,clang::FunctionProtoTypeLoc,clang::CXXRecordDecl *,unsigned int,Fn)'
with
[
Fn=clang::Sema::SubstFunctionDeclType::<lambda_756edcbe7bd5c7584849a6e3a1491735>
]
c:\bb-win7\ninja-clang-i686-msc17-r\llvm-project\clang\lib\sema\TreeTransform.h(4532): or 'clang::QualType clang::TreeTransform<Derived>::TransformFunctionProtoType<clang::Sema::SubstFunctionDeclType::<lambda_756edcbe7bd5c7584849a6e3a1491735>>(clang::TypeLocBuilder &,clang::FunctionProtoTypeLoc,clang::CXXRecordDecl *,unsigned int,Fn)'
with
[
Derived=`anonymous-namespace'::TemplateInstantiator,
Fn=clang::Sema::SubstFunctionDeclType::<lambda_756edcbe7bd5c7584849a6e3a1491735>
]
while trying to match the argument list '(clang::TypeLocBuilder, clang::FunctionProtoTypeLoc, clang::CXXRecordDecl *, unsigned int, clang::Sema::SubstFunctionDeclType::<lambda_756edcbe7bd5c7584849a6e3a1491735>)'
1. http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20140915/115011.html
2. http://bb.pgr.jp/builders/ninja-clang-i686-msc17-R/builds/10515/steps/build_clang_tools_1/logs/stdio
llvm-svn: 218058
Diffstat (limited to 'clang/test/SemaTemplate/instantiate-exception-spec.cpp')
-rw-r--r-- | clang/test/SemaTemplate/instantiate-exception-spec.cpp | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/clang/test/SemaTemplate/instantiate-exception-spec.cpp b/clang/test/SemaTemplate/instantiate-exception-spec.cpp index d3411722283..993ee8dfae1 100644 --- a/clang/test/SemaTemplate/instantiate-exception-spec.cpp +++ b/clang/test/SemaTemplate/instantiate-exception-spec.cpp @@ -1,7 +1,5 @@ -// RUN: %clang_cc1 -fexceptions -fcxx-exceptions -verify %s -DERRORS -// RUN: %clang_cc1 -fexceptions -fcxx-exceptions -emit-llvm-only %s +// RUN: %clang_cc1 -fsyntax-only -verify %s -#ifdef ERRORS template<typename T> void f1(T*) throw(T); // expected-error{{incomplete type 'Incomplete' is not allowed in exception specification}} struct Incomplete; // expected-note{{forward}} @@ -9,20 +7,3 @@ void test_f1(Incomplete *incomplete_p, int *int_p) { f1(int_p); f1(incomplete_p); // expected-note{{instantiation of}} } -#endif - -template<typename T> void f(void (*p)() throw(T)) { -#ifdef ERRORS - void (*q)() throw(char) = p; // expected-error {{target exception spec}} - - extern void (*p2)() throw(T); - void (*q2)() throw(char) = p2; // expected-error {{target exception spec}} - - extern void (*p3)() throw(char); - void (*q3)() throw(T) = p3; // expected-error {{target exception spec}} - - void (*q4)() throw(T) = p2; // ok -#endif - p(); -} -void g() { f<int>(0); } // expected-note {{instantiation of}} |