diff options
| author | John McCall <rjmccall@apple.com> | 2010-05-28 08:37:35 +0000 |
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2010-05-28 08:37:35 +0000 |
| commit | f9c94093f99fabbd6a4f116ae30fcc9ef155adad (patch) | |
| tree | 6482744851051e3b9f64217232ffdf018052e722 /clang/lib/Sema/SemaExceptionSpec.cpp | |
| parent | 2177a9b65a637e2c978e90f467c2d6fe07ac920e (diff) | |
| download | llvm-f9c94093f99fabbd6a4f116ae30fcc9ef155adad.zip llvm-f9c94093f99fabbd6a4f116ae30fcc9ef155adad.tar.gz llvm-f9c94093f99fabbd6a4f116ae30fcc9ef155adad.tar.bz2 | |
Disable exception-spec compatibility checking under -fno-exceptions.
Fixes PR7243.
llvm-svn: 104942
Diffstat (limited to 'clang/lib/Sema/SemaExceptionSpec.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaExceptionSpec.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaExceptionSpec.cpp b/clang/lib/Sema/SemaExceptionSpec.cpp index 7d73fe4..34a479a 100644 --- a/clang/lib/Sema/SemaExceptionSpec.cpp +++ b/clang/lib/Sema/SemaExceptionSpec.cpp @@ -249,6 +249,10 @@ bool Sema::CheckEquivalentExceptionSpec(const PartialDiagnostic &DiagID, SourceLocation NewLoc, bool *MissingExceptionSpecification, bool *MissingEmptyExceptionSpecification) { + // Just completely ignore this under -fno-exceptions. + if (!getLangOptions().Exceptions) + return false; + if (MissingExceptionSpecification) *MissingExceptionSpecification = false; @@ -318,6 +322,11 @@ bool Sema::CheckExceptionSpecSubset( const PartialDiagnostic &DiagID, const PartialDiagnostic & NoteID, const FunctionProtoType *Superset, SourceLocation SuperLoc, const FunctionProtoType *Subset, SourceLocation SubLoc) { + + // Just auto-succeed under -fno-exceptions. + if (!getLangOptions().Exceptions) + return false; + // FIXME: As usual, we could be more specific in our error messages, but // that better waits until we've got types with source locations. |
