diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-09-30 00:48:50 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-09-30 00:48:50 +0000 |
commit | a91de375f2785352fa26407ef85a4347bccea98e (patch) | |
tree | 8d42f3d0cd42c6387dc7fc3fa077af01b61a994e /clang/test/FixIt/fixit.cpp | |
parent | b189b5c5359e2bd2143bacde3d73459fd84186bf (diff) | |
download | bcm5719-llvm-a91de375f2785352fa26407ef85a4347bccea98e.tar.gz bcm5719-llvm-a91de375f2785352fa26407ef85a4347bccea98e.zip |
Promote a warning on ill-formed code (redeclaration missing an exception
specification) to an error. No compiler other than Clang seems to allow this,
and it doesn't seem like a useful thing to accept as an extension in general.
The current behavior was added for PR5957, where the problem was specifically
related to mismatches of the exception specification on the implicitly-declared
global operator new and delete. To retain that workaround, we downgrade the
error to an ExtWarn when the declaration is of a replaceable global allocation
function.
Now that this is an error, stop trying (and failing) to recover from a missing
computed noexcept specification. That recovery didn't work, and led to crashes
in code like the added testcase.
llvm-svn: 248867
Diffstat (limited to 'clang/test/FixIt/fixit.cpp')
-rw-r--r-- | clang/test/FixIt/fixit.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/FixIt/fixit.cpp b/clang/test/FixIt/fixit.cpp index 512713aa529..686cc23d635 100644 --- a/clang/test/FixIt/fixit.cpp +++ b/clang/test/FixIt/fixit.cpp @@ -45,7 +45,7 @@ class B : public A { }; void f() throw(); // expected-note{{previous}} -void f(); // expected-warning{{missing exception specification}} +void f(); // expected-error{{missing exception specification}} namespace rdar7853795 { struct A { |