[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 19 12:05:42 PDT 2023
================
@@ -1333,7 +1333,14 @@ void StmtProfiler::VisitPredefinedExpr(const PredefinedExpr *S) {
void StmtProfiler::VisitIntegerLiteral(const IntegerLiteral *S) {
VisitExpr(S);
S->getValue().Profile(ID);
- ID.AddInteger(S->getType()->castAs<BuiltinType>()->getKind());
+
+ QualType T = S->getType();
+ ID.AddInteger(T->getTypeClass());
+ if (auto BitIntT = T->getAs<BitIntType>()) {
----------------
erichkeane wrote:
don't do curleys on a 1 liner if/else here, per coding standard.
Else, LGTM.
https://github.com/llvm/llvm-project/pull/65889
More information about the cfe-commits
mailing list