Add Attribute NoThrow as an Exception Specifier Type
authorErich Keane <erich.keane@intel.com>
Thu, 30 May 2019 17:31:54 +0000 (17:31 +0000)
committerErich Keane <erich.keane@intel.com>
Thu, 30 May 2019 17:31:54 +0000 (17:31 +0000)
commitd02f4a1043c0c6b472e6cfeb8a34f282d7cccb31
treebdbc7d80e0e10cf8566b6ae2e458bc17cfa1fd79
parent51ce0b196a8babe7ac8b81da69139a2eae3cca0b
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
14 files changed:
clang/include/clang-c/Index.h
clang/include/clang/AST/Decl.h
clang/include/clang/AST/Type.h
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/include/clang/Basic/ExceptionSpecificationType.h
clang/lib/AST/ASTContext.cpp
clang/lib/AST/JSONNodeDumper.cpp
clang/lib/AST/Type.cpp
clang/lib/Sema/SemaDeclAttr.cpp
clang/lib/Sema/SemaDeclCXX.cpp
clang/lib/Sema/SemaExprCXX.cpp
clang/lib/Sema/SemaType.cpp
clang/test/SemaCXX/nothrow-vs-exception-specs.cpp [new file with mode: 0644]
clang/tools/libclang/CXType.cpp