diff --git a/clang/lib/AST/StmtProfile.cpp b/clang/lib/AST/StmtProfile.cpp index 2e4f15f83ac26..763d3d6126980 100644 --- a/clang/lib/AST/StmtProfile.cpp +++ b/clang/lib/AST/StmtProfile.cpp @@ -1335,6 +1335,8 @@ void StmtProfiler::VisitIntegerLiteral(const IntegerLiteral *S) { S->getValue().Profile(ID); QualType T = S->getType(); + if (Canonical) + T = T.getCanonicalType(); ID.AddInteger(T->getTypeClass()); if (auto BitIntT = T->getAs()) BitIntT->Profile(ID);