diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-10-16 17:54:23 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-10-16 17:54:23 +0000 |
commit | 3c4f8d2e96c4b83108bfc48bfdaf2b6d5ebbd6bf (patch) | |
tree | ab5b37c2e879b528275ff0b16a71a710d4acd949 /clang/lib/Sema/SemaExceptionSpec.cpp | |
parent | e3a9a676f9e3000662c05ff35a3b4312e04b5ee2 (diff) | |
download | bcm5719-llvm-3c4f8d2e96c4b83108bfc48bfdaf2b6d5ebbd6bf.tar.gz bcm5719-llvm-3c4f8d2e96c4b83108bfc48bfdaf2b6d5ebbd6bf.zip |
P0012R1: Make exception specifications be part of the type system. This
implements the bulk of the change (modifying the type system to include
exception specifications), but not all the details just yet.
llvm-svn: 284337
Diffstat (limited to 'clang/lib/Sema/SemaExceptionSpec.cpp')
-rw-r--r-- | clang/lib/Sema/SemaExceptionSpec.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaExceptionSpec.cpp b/clang/lib/Sema/SemaExceptionSpec.cpp index f8e75b2fe79..a81ef517954 100644 --- a/clang/lib/Sema/SemaExceptionSpec.cpp +++ b/clang/lib/Sema/SemaExceptionSpec.cpp @@ -130,6 +130,11 @@ bool Sema::CheckSpecifiedExceptionType(QualType &T, SourceRange Range) { /// to member to a function with an exception specification. This means that /// it is invalid to add another level of indirection. bool Sema::CheckDistantExceptionSpec(QualType T) { + // C++17 removes this rule in favor of putting exception specifications into + // the type system. + if (getLangOpts().CPlusPlus1z) + return false; + if (const PointerType *PT = T->getAs<PointerType>()) T = PT->getPointeeType(); else if (const MemberPointerType *PT = T->getAs<MemberPointerType>()) |