aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/StmtProfile.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-07-30 23:18:24 +0000
committerDouglas Gregor <dgregor@apple.com>2009-07-30 23:18:24 +0000
commitb197572cf1cd70a817a1f546478cb2cb9112c48e (patch)
tree478c5a2caa30004f0c3662d9f9f5c4d43be3d4ab /lib/AST/StmtProfile.cpp
parent03e205031b08669f05c41eed5b896fc94c4a12bb (diff)
Canonicalization for dependent typeof(expr) types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77639 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/StmtProfile.cpp')
-rw-r--r--lib/AST/StmtProfile.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/AST/StmtProfile.cpp b/lib/AST/StmtProfile.cpp
index 688777d4aa..8039d97731 100644
--- a/lib/AST/StmtProfile.cpp
+++ b/lib/AST/StmtProfile.cpp
@@ -602,9 +602,9 @@ void StmtProfiler::VisitObjCIsaExpr(ObjCIsaExpr *S) {
}
void StmtProfiler::VisitDecl(Decl *D) {
- if (Canonical) {
+ if (Canonical && D) {
if (NonTypeTemplateParmDecl *NTTP
- = dyn_cast_or_null<NonTypeTemplateParmDecl>(D)) {
+ = dyn_cast<NonTypeTemplateParmDecl>(D)) {
ID.AddInteger(NTTP->getDepth());
ID.AddInteger(NTTP->getIndex());
VisitType(NTTP->getType());