[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

2023-09-29 Thread Erich Keane via cfe-commits
@@ -1333,7 +1333,13 @@ void StmtProfiler::VisitPredefinedExpr(const PredefinedExpr *S) { void StmtProfiler::VisitIntegerLiteral(const IntegerLiteral *S) { VisitExpr(S); S->getValue().Profile(ID); - ID.AddInteger(S->getType()->castAs()->getKind()); + + QualType T =

[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

2023-09-29 Thread Henrik G. Olsson via cfe-commits
@@ -1333,7 +1333,13 @@ void StmtProfiler::VisitPredefinedExpr(const PredefinedExpr *S) { void StmtProfiler::VisitIntegerLiteral(const IntegerLiteral *S) { VisitExpr(S); S->getValue().Profile(ID); - ID.AddInteger(S->getType()->castAs()->getKind()); + + QualType T =

[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

2023-09-20 Thread via cfe-commits
https://github.com/vabridgers closed https://github.com/llvm/llvm-project/pull/65889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

2023-09-20 Thread via cfe-commits
https://github.com/DonatNagyE approved this pull request. https://github.com/llvm/llvm-project/pull/65889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

2023-09-19 Thread via cfe-commits
https://github.com/vabridgers resolved https://github.com/llvm/llvm-project/pull/65889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

2023-09-19 Thread via cfe-commits
https://github.com/vabridgers resolved https://github.com/llvm/llvm-project/pull/65889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

2023-09-19 Thread via cfe-commits
https://github.com/vabridgers resolved https://github.com/llvm/llvm-project/pull/65889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

2023-09-19 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/65889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

2023-09-19 Thread via cfe-commits
@@ -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()->getKind()); + + QualType T =

[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

2023-09-19 Thread via cfe-commits
https://github.com/vabridgers updated https://github.com/llvm/llvm-project/pull/65889 >From 79e1ab6388e44708eedf4d8351b35c7a2500367a Mon Sep 17 00:00:00 2001 From: Vince Bridgers Date: Sat, 9 Sep 2023 12:19:07 +0200 Subject: [PATCH] [clang] [C23] Fix crash with _BitInt running clang-tidy This

[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

2023-09-19 Thread Erich Keane via cfe-commits
@@ -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()->getKind()); + + QualType T =

[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

2023-09-19 Thread via cfe-commits
https://github.com/vabridgers updated https://github.com/llvm/llvm-project/pull/65889 >From b7d3ca20cc195d9ac95e8914aa4e69b922b1aca3 Mon Sep 17 00:00:00 2001 From: Vince Bridgers Date: Sat, 9 Sep 2023 12:19:07 +0200 Subject: [PATCH] [clang] [C23] Fix crash with _BitInt running clang-tidy This

[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

2023-09-19 Thread via cfe-commits
https://github.com/DonatNagyE edited https://github.com/llvm/llvm-project/pull/65889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

2023-09-19 Thread via cfe-commits
@@ -1333,7 +1333,15 @@ void StmtProfiler::VisitPredefinedExpr(const PredefinedExpr *S) { void StmtProfiler::VisitIntegerLiteral(const IntegerLiteral *S) { VisitExpr(S); S->getValue().Profile(ID); - ID.AddInteger(S->getType()->castAs()->getKind()); + + QualType T =

[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

2023-09-18 Thread Erich Keane via cfe-commits
@@ -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()->getKind()); + + QualType T =

[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

2023-09-18 Thread via cfe-commits
https://github.com/vabridgers updated https://github.com/llvm/llvm-project/pull/65889 >From 73d3a59e98ca78931e07428f945c26107812383b Mon Sep 17 00:00:00 2001 From: Vince Bridgers Date: Sat, 9 Sep 2023 12:19:07 +0200 Subject: [PATCH] [clang] [C23] Fix crash with _BitInt running clang-tidy This

[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

2023-09-18 Thread via cfe-commits
@@ -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()->getKind()); + + QualType T =

[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

2023-09-18 Thread via cfe-commits
vabridgers wrote: The status above is showing 1 change requested, but I think I've addressed all comments. Please review at your convenience. Thank you. https://github.com/llvm/llvm-project/pull/65889 ___ cfe-commits mailing list

[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

2023-09-17 Thread via cfe-commits
@@ -1333,7 +1333,15 @@ void StmtProfiler::VisitPredefinedExpr(const PredefinedExpr *S) { void StmtProfiler::VisitIntegerLiteral(const IntegerLiteral *S) { VisitExpr(S); S->getValue().Profile(ID); - ID.AddInteger(S->getType()->castAs()->getKind()); + + int FoldingSetID =

[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

2023-09-17 Thread via cfe-commits
https://github.com/vabridgers resolved https://github.com/llvm/llvm-project/pull/65889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

2023-09-12 Thread Aaron Ballman via cfe-commits
@@ -1333,7 +1333,15 @@ void StmtProfiler::VisitPredefinedExpr(const PredefinedExpr *S) { void StmtProfiler::VisitIntegerLiteral(const IntegerLiteral *S) { VisitExpr(S); S->getValue().Profile(ID); - ID.AddInteger(S->getType()->castAs()->getKind()); + + int FoldingSetID =

[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

2023-09-12 Thread via cfe-commits
https://github.com/DonatNagyE edited https://github.com/llvm/llvm-project/pull/65889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

2023-09-12 Thread via cfe-commits
@@ -1333,7 +1333,15 @@ void StmtProfiler::VisitPredefinedExpr(const PredefinedExpr *S) { void StmtProfiler::VisitIntegerLiteral(const IntegerLiteral *S) { VisitExpr(S); S->getValue().Profile(ID); - ID.AddInteger(S->getType()->castAs()->getKind()); + + int FoldingSetID =

[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

2023-09-12 Thread Aaron Ballman via cfe-commits
@@ -1333,7 +1333,15 @@ void StmtProfiler::VisitPredefinedExpr(const PredefinedExpr *S) { void StmtProfiler::VisitIntegerLiteral(const IntegerLiteral *S) { VisitExpr(S); S->getValue().Profile(ID); - ID.AddInteger(S->getType()->castAs()->getKind()); + + int FoldingSetID =

[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

2023-09-12 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/65889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

2023-09-12 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Please be sure to add a release note about the fix as well. https://github.com/llvm/llvm-project/pull/65889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

2023-09-12 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/65889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

2023-09-12 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 commented: I wonder whether we should also add some test in clang/analysis module? Crash happens in `StmtProfiler` but only add test case in clang-tidy level. https://github.com/llvm/llvm-project/pull/65889 ___

[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

2023-09-11 Thread via cfe-commits
@@ -1333,7 +1333,15 @@ void StmtProfiler::VisitPredefinedExpr(const PredefinedExpr *S) { void StmtProfiler::VisitIntegerLiteral(const IntegerLiteral *S) { VisitExpr(S); S->getValue().Profile(ID); - ID.AddInteger(S->getType()->castAs()->getKind()); + + int FoldingSetID =

[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

2023-09-10 Thread via cfe-commits
@@ -1333,7 +1333,15 @@ void StmtProfiler::VisitPredefinedExpr(const PredefinedExpr *S) { void StmtProfiler::VisitIntegerLiteral(const IntegerLiteral *S) { VisitExpr(S); S->getValue().Profile(ID); - ID.AddInteger(S->getType()->castAs()->getKind()); + + int FoldingSetID =

[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

2023-09-10 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr edited https://github.com/llvm/llvm-project/pull/65889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

2023-09-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Changes This crash was exposed recently in our randomized testing. _BitInts were not being handled properly during IntegerLiteral visitation. This patch addresses the problem for now. The BitIntType has no getKind() method, so the FoldingSetID is

[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

2023-09-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Changes This crash was exposed recently in our randomized testing. _BitInts were not being handled properly during IntegerLiteral visitation. This patch addresses the problem for now. The BitIntType has no getKind() method, so the FoldingSetID

[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

2023-09-10 Thread via cfe-commits
https://github.com/llvmbot labeled https://github.com/llvm/llvm-project/pull/65889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

2023-09-10 Thread via cfe-commits
https://github.com/llvmbot labeled https://github.com/llvm/llvm-project/pull/65889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

2023-09-10 Thread via cfe-commits
https://github.com/vabridgers review_requested https://github.com/llvm/llvm-project/pull/65889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits