summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/Decl.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2019-09-27 01:26:49 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2019-09-27 01:26:49 +0000
commit62a95568efa835b6583b517bef60694ec07639ba (patch)
tree67ef5ab448dc14cf4e83b2bc40057739b2f9b1e1 /clang/lib/AST/Decl.cpp
parentda1b4347e41aa5bf76cb2151318bf5917bc9ee99 (diff)
downloadbcm5719-llvm-62a95568efa835b6583b517bef60694ec07639ba.tar.gz
bcm5719-llvm-62a95568efa835b6583b517bef60694ec07639ba.zip
For P0784R7: add support for new (std::nothrow).
llvm-svn: 373037
Diffstat (limited to 'clang/lib/AST/Decl.cpp')
-rw-r--r--clang/lib/AST/Decl.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp
index 135b5f71c7e..e95338138fe 100644
--- a/clang/lib/AST/Decl.cpp
+++ b/clang/lib/AST/Decl.cpp
@@ -2977,8 +2977,7 @@ bool FunctionDecl::isReplaceableGlobalAllocationFunction(bool *IsAligned) const
Ty = Ty->getPointeeType();
if (Ty.getCVRQualifiers() != Qualifiers::Const)
return false;
- const CXXRecordDecl *RD = Ty->getAsCXXRecordDecl();
- if (RD && isNamed(RD, "nothrow_t") && RD->isInStdNamespace())
+ if (Ty->isNothrowT())
Consume();
}
OpenPOWER on IntegriCloud