summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExceptionSpec.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-03-02 02:04:40 +0000
committerJohn McCall <rjmccall@apple.com>2011-03-02 02:04:40 +0000
commit8feeb4966210bb7563cbbd07b9e322a386c0cb10 (patch)
treef2dc72170eb52f4d0673fc99c6a3f48a54f0471e /clang/lib/Sema/SemaExceptionSpec.cpp
parentc52264e71931352cc1e87130713b4a4bc6872a03 (diff)
downloadbcm5719-llvm-8feeb4966210bb7563cbbd07b9e322a386c0cb10.tar.gz
bcm5719-llvm-8feeb4966210bb7563cbbd07b9e322a386c0cb10.zip
Semantic checking for exception specifications should be triggered by
whether C++ exceptions are enabled, not exceptions in general. PR9358. llvm-svn: 126820
Diffstat (limited to 'clang/lib/Sema/SemaExceptionSpec.cpp')
-rw-r--r--clang/lib/Sema/SemaExceptionSpec.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaExceptionSpec.cpp b/clang/lib/Sema/SemaExceptionSpec.cpp
index 5d7993b1afb..123e185cab3 100644
--- a/clang/lib/Sema/SemaExceptionSpec.cpp
+++ b/clang/lib/Sema/SemaExceptionSpec.cpp
@@ -160,7 +160,7 @@ bool Sema::CheckEquivalentExceptionSpec(FunctionDecl *Old, FunctionDecl *New) {
// If exceptions are disabled, suppress the warning about missing
// exception specifications for new and delete operators.
- if (!getLangOptions().Exceptions) {
+ if (!getLangOptions().CXXExceptions) {
switch (New->getDeclName().getCXXOverloadedOperator()) {
case OO_New:
case OO_Array_New:
@@ -249,7 +249,7 @@ bool Sema::CheckEquivalentExceptionSpec(const PartialDiagnostic &DiagID,
bool *MissingExceptionSpecification,
bool *MissingEmptyExceptionSpecification) {
// Just completely ignore this under -fno-exceptions.
- if (!getLangOptions().Exceptions)
+ if (!getLangOptions().CXXExceptions)
return false;
if (MissingExceptionSpecification)
@@ -331,7 +331,7 @@ bool Sema::CheckExceptionSpecSubset(
const FunctionProtoType *Subset, SourceLocation SubLoc) {
// Just auto-succeed under -fno-exceptions.
- if (!getLangOptions().Exceptions)
+ if (!getLangOptions().CXXExceptions)
return false;
// FIXME: As usual, we could be more specific in our error messages, but
OpenPOWER on IntegriCloud