diff options
author | Erich Keane <erich.keane@intel.com> | 2019-05-30 17:31:54 +0000 |
---|---|---|
committer | Erich Keane <erich.keane@intel.com> | 2019-05-30 17:31:54 +0000 |
commit | d02f4a1043c0c6b472e6cfeb8a34f282d7cccb31 (patch) | |
tree | bdbc7d80e0e10cf8566b6ae2e458bc17cfa1fd79 /clang/lib/Sema/SemaDeclCXX.cpp | |
parent | 51ce0b196a8babe7ac8b81da69139a2eae3cca0b (diff) | |
download | bcm5719-llvm-d02f4a1043c0c6b472e6cfeb8a34f282d7cccb31.tar.gz bcm5719-llvm-d02f4a1043c0c6b472e6cfeb8a34f282d7cccb31.zip |
Add Attribute NoThrow as an Exception Specifier Type
In response to https://bugs.llvm.org/show_bug.cgi?id=33235, it became
clear that the current mechanism of hacking through checks for the
exception specification of a function gets confused really quickly when
there are alternate exception specifiers.
This patch introcues EST_NoThrow, which is the equivilent of
EST_noexcept when caused by EST_noThrow. The existing implementation is
left in place to cover functions with no FunctionProtoType.
Differential Revision: https://reviews.llvm.org/D62435
llvm-svn: 362119
Diffstat (limited to 'clang/lib/Sema/SemaDeclCXX.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDeclCXX.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index b3920ff01bd..35863a32662 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -192,6 +192,7 @@ Sema::ImplicitExceptionSpecification::CalledDecl(SourceLocation CallLoc, // If this function has a basic noexcept, it doesn't affect the outcome. case EST_BasicNoexcept: case EST_NoexceptTrue: + case EST_NoThrow: return; // If we're still at noexcept(true) and there's a throw() callee, // change to that specification. @@ -15457,6 +15458,7 @@ bool Sema::checkThisInStaticMemberFunctionExceptionSpec(CXXMethodDecl *Method) { case EST_Uninstantiated: case EST_Unevaluated: case EST_BasicNoexcept: + case EST_NoThrow: case EST_DynamicNone: case EST_MSAny: case EST_None: |