aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJayant Chowdhary <jchowdhary@google.com>2018-01-25 00:39:03 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-01-25 00:39:03 +0000
commit0a0aca98bdcb51766a7bbbd071e7dd4ea4ab40cb (patch)
treed3979f7ac81b4a0c53ee8988f774de230506abce
parent363a210ec57a0dfdcbcfc96161c0ea7b7f82ae2c (diff)
parent81d1fb439defba7c40db5a94440df4c04a3e74bc (diff)
downloadclang-0a0aca98bdcb51766a7bbbd071e7dd4ea4ab40cb.tar.gz
Merge "Add nullptr check after dyn_cast to CXXRecordDecl in mangleLocalName()."android-wear-8.0.0_r1
-rw-r--r--lib/AST/ItaniumMangle.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/AST/ItaniumMangle.cpp b/lib/AST/ItaniumMangle.cpp
index 5a7c45594e..376cf6fdee 100644
--- a/lib/AST/ItaniumMangle.cpp
+++ b/lib/AST/ItaniumMangle.cpp
@@ -1471,7 +1471,7 @@ void CXXNameMangler::mangleLocalName(const Decl *D,
// numbering will be local to the particular argument in which it appears
// -- other default arguments do not affect its encoding.
const CXXRecordDecl *CXXRD = dyn_cast<CXXRecordDecl>(RD);
- if (CXXRD->isLambda()) {
+ if (CXXRD && CXXRD->isLambda()) {
if (const ParmVarDecl *Parm
= dyn_cast_or_null<ParmVarDecl>(CXXRD->getLambdaContextDecl())) {
if (const FunctionDecl *Func
@@ -1484,7 +1484,7 @@ void CXXNameMangler::mangleLocalName(const Decl *D,
}
}
}
-
+
// Mangle the name relative to the closest enclosing function.
// equality ok because RD derived from ND above
if (D == RD) {