diff options
author | Erich Keane <erich.keane@intel.com> | 2019-05-31 16:46:38 +0000 |
---|---|---|
committer | Erich Keane <erich.keane@intel.com> | 2019-05-31 16:46:38 +0000 |
commit | b5cfeee0a6e73044cc755e2ab08145056b2d3fd4 (patch) | |
tree | 41673142547b77547c07dae049a4295fe5632bae /lib/Sema/SemaType.cpp | |
parent | b1e7e8246219d59b7ba0dbaf613b1eb366918d79 (diff) | |
download | clang-b5cfeee0a6e73044cc755e2ab08145056b2d3fd4.tar.gz |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@362243 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaType.cpp')
-rw-r--r-- | lib/Sema/SemaType.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp index 43ac435a82..d473fb6c8f 100644 --- a/lib/Sema/SemaType.cpp +++ b/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; } |