summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorErich Keane <erich.keane@intel.com>2019-05-31 16:46:38 +0000
committerErich Keane <erich.keane@intel.com>2019-05-31 16:46:38 +0000
commitc61762797ea4ec868d06c5a5d90dc17f0b19ea68 (patch)
treecc2a99b8b17212a580fb151abc2ab482cbd52842 /clang/lib
parent1e692d1777ae34dcb93524b5798651a29defae09 (diff)
downloadbcm5719-llvm-c61762797ea4ec868d06c5a5d90dc17f0b19ea68.tar.gz
bcm5719-llvm-c61762797ea4ec868d06c5a5d90dc17f0b19ea68.zip
Suppress nothrow/Exception spec conflict warning when we dont know the ES.
In any situation where the Exception Spec isn't clear, suppress the warning to avoid false positives. llvm-svn: 362243
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaType.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/clang/lib/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp
index 43ac435a824..d473fb6c8f3 100644
--- a/clang/lib/Sema/SemaType.cpp
+++ b/clang/lib/Sema/SemaType.cpp
@@ -6976,18 +6976,18 @@ static bool handleFunctionTypeAttr(TypeProcessingState &state, ParsedAttr &attr,
case EST_BasicNoexcept:
case EST_NoexceptTrue:
case EST_NoThrow:
- case EST_Unparsed:
// Exception spec doesn't conflict with nothrow, so don't warn.
- // Unparsed is included in this, since method signatures aren't parsed
- // until after the fact.
+ LLVM_FALLTHROUGH;
+ case EST_Unparsed:
+ case EST_Uninstantiated:
+ case EST_DependentNoexcept:
+ case EST_Unevaluated:
+ // We don't have enough information to properly determine if there is a
+ // conflict, so suppress the warning.
break;
-
case EST_Dynamic:
case EST_MSAny:
case EST_NoexceptFalse:
- case EST_DependentNoexcept:
- case EST_Unevaluated:
- case EST_Uninstantiated:
S.Diag(attr.getLoc(), diag::warn_nothrow_attribute_ignored);
break;
}
OpenPOWER on IntegriCloud