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 | 811d0bec4d4eb6a8ff373f97f98354d6e0e54ecb (patch) | |
tree | f8786274a29f2ca23e786fc43023d9d090d8e36e /lib/Sema/SemaExceptionSpec.cpp | |
parent | 1d0a5856d066f9030efbe3e0d9bbbb50ea597b99 (diff) |
Disable exception-spec compatibility checking under -fno-exceptions.
Fixes PR7243.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104942 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExceptionSpec.cpp')
-rw-r--r-- | lib/Sema/SemaExceptionSpec.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Sema/SemaExceptionSpec.cpp b/lib/Sema/SemaExceptionSpec.cpp index 7d73fe4777..34a479ae2a 100644 --- a/lib/Sema/SemaExceptionSpec.cpp +++ b/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. |