forked from OSchip/llvm-project
Handle null QualType better in Stmt::Profile
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
This commit is contained in:
parent
d532ddcce9
commit
a5f4ade268
|
@ -128,7 +128,7 @@ namespace {
|
|||
}
|
||||
|
||||
void VisitType(QualType T) override {
|
||||
if (Canonical)
|
||||
if (Canonical && !T.isNull())
|
||||
T = Context.getCanonicalType(T);
|
||||
|
||||
ID.AddPointer(T.getAsOpaquePtr());
|
||||
|
|
Loading…
Reference in New Issue