projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d532ddc
)
Handle null QualType better in Stmt::Profile
author
Richard Trieu
<rtrieu@google.com>
Sat, 4 Mar 2017 02:42:41 +0000
(
02:42
+0000)
committer
Richard Trieu
<rtrieu@google.com>
Sat, 4 Mar 2017 02:42:41 +0000
(
02:42
+0000)
If the QualType is null, calling ASTContext::getCanonicalType on it will lead
to an assert. This was found while testing a new use for Stmt::Profile, so
there is no test case for this.
llvm-svn: 296956
clang/lib/AST/StmtProfile.cpp
patch
|
blob
|
history
diff --git
a/clang/lib/AST/StmtProfile.cpp
b/clang/lib/AST/StmtProfile.cpp
index
1ac2a5b
..
5f3a50b
100644
(file)
--- a/
clang/lib/AST/StmtProfile.cpp
+++ b/
clang/lib/AST/StmtProfile.cpp
@@
-128,7
+128,7
@@
namespace {
}
void VisitType(QualType T) override {
- if (Canonical)
+ if (Canonical
&& !T.isNull()
)
T = Context.getCanonicalType(T);
ID.AddPointer(T.getAsOpaquePtr());