[clang] [clang][analyzer] Correctly handle lambda-converted function pointers (PR #144906)

2025-06-19 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. https://github.com/llvm/llvm-project/pull/144906 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Correctly handle lambda-converted function pointers (PR #144906)

2025-06-19 Thread Balazs Benics via cfe-commits
steakhal wrote: Hey, looks like a nice patch! I only have one question. Have you considered overriding some other `getRuntimeDefinition` too? When I'm looking at the [CallEvent ](https://clang.llvm.org/doxygen/classclang_1_1ento_1_1CallEvent.html) inheritance graph, there could be a couple ot

[clang] [analyzer] Conversion to CheckerFamily: DynamicTypePropagation (PR #144735)

2025-06-18 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. https://github.com/llvm/llvm-project/pull/144735 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Conversion to CheckerFamily: NullabilityChecker (PR #143735)

2025-06-16 Thread Balazs Benics via cfe-commits
=?utf-8?q?Don=C3=A1t?= Nagy Message-ID: In-Reply-To: https://github.com/steakhal approved this pull request. https://github.com/llvm/llvm-project/pull/143735 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [analyzer] Conversion to CheckerFamily: NullabilityChecker (PR #143735)

2025-06-15 Thread Balazs Benics via cfe-commits
@@ -326,39 +326,37 @@ def StdVariantChecker : Checker<"StdVariant">, let ParentPackage = Nullability in { -def NullabilityBase : Checker<"NullabilityBase">, - HelpText<"Stores information during the analysis about nullability.">, - Documentation, - Hidden; - -def NullPasse

[clang] [analyzer] Conversion to CheckerFamily: NullabilityChecker (PR #143735)

2025-06-15 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/143735 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Conversion to CheckerFamily: NullabilityChecker (PR #143735)

2025-06-15 Thread Balazs Benics via cfe-commits
@@ -326,39 +326,37 @@ def StdVariantChecker : Checker<"StdVariant">, let ParentPackage = Nullability in { -def NullabilityBase : Checker<"NullabilityBase">, - HelpText<"Stores information during the analysis about nullability.">, - Documentation, - Hidden; - -def NullPasse

[clang] [analyzer] Conversion to CheckerFamily: NullabilityChecker (PR #143735)

2025-06-15 Thread Balazs Benics via cfe-commits
https://github.com/steakhal commented: Looks good to me. Thanks. I had only tiny nits. https://github.com/llvm/llvm-project/pull/143735 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Conversion to CheckerFamily: NullabilityChecker (PR #143735)

2025-06-15 Thread Balazs Benics via cfe-commits
@@ -326,39 +326,37 @@ def StdVariantChecker : Checker<"StdVariant">, let ParentPackage = Nullability in { -def NullabilityBase : Checker<"NullabilityBase">, - HelpText<"Stores information during the analysis about nullability.">, - Documentation, - Hidden; - -def NullPasse

[clang-tools-extra] [clang-tidy] Added bugprone-unsequenced-global-accesses check (PR #130421)

2025-06-12 Thread Balazs Benics via cfe-commits
steakhal wrote: CC @michael-jabbour-sonarsource https://github.com/llvm/llvm-project/pull/130421 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Correct SMT Layer for _BitInt cases refutations (PR #143310)

2025-06-11 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. https://github.com/llvm/llvm-project/pull/143310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Correct SMT Layer for _BitInt cases refutations (PR #143310)

2025-06-11 Thread Balazs Benics via cfe-commits
https://github.com/steakhal requested changes to this pull request. https://github.com/llvm/llvm-project/pull/143310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Correct SMT Layer for _BitInt cases refutations (PR #143310)

2025-06-11 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,22 @@ +// RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -w \ +// RUN: -analyzer-config crosscheck-with-z3=true -verify %s +// REQUIRES: z3 + +// Previously these tests were crashing because the SMTConv layer did not +// comprehend the _BitInt typ

[clang] [clang][analyzer] Correct SMT Layer for _BitInt cases refutations (PR #143310)

2025-06-11 Thread Balazs Benics via cfe-commits
@@ -570,23 +572,35 @@ class SMTConv { // TODO: Refactor to put elsewhere static inline QualType getAPSIntType(ASTContext &Ctx, const llvm::APSInt &Int) { -return Ctx.getIntTypeForBitwidth(Int.getBitWidth(), Int.isSigned()); +Qu

[clang] [clang][analyzer] Correct SMT Layer for _BitInt cases refutations (PR #143310)

2025-06-11 Thread Balazs Benics via cfe-commits
@@ -570,23 +572,35 @@ class SMTConv { // TODO: Refactor to put elsewhere static inline QualType getAPSIntType(ASTContext &Ctx, const llvm::APSInt &Int) { -return Ctx.getIntTypeForBitwidth(Int.getBitWidth(), Int.isSigned()); +Qu

[clang] [clang][analyzer] Correct SMT Layer for _BitInt cases refutations (PR #143310)

2025-06-11 Thread Balazs Benics via cfe-commits
@@ -570,23 +572,35 @@ class SMTConv { // TODO: Refactor to put elsewhere static inline QualType getAPSIntType(ASTContext &Ctx, const llvm::APSInt &Int) { -return Ctx.getIntTypeForBitwidth(Int.getBitWidth(), Int.isSigned()); +Qu

[clang] [clang][analyzer] Correct SMT Layer for _BitInt cases refutations (PR #143310)

2025-06-11 Thread Balazs Benics via cfe-commits
@@ -570,23 +572,35 @@ class SMTConv { // TODO: Refactor to put elsewhere static inline QualType getAPSIntType(ASTContext &Ctx, const llvm::APSInt &Int) { -return Ctx.getIntTypeForBitwidth(Int.getBitWidth(), Int.isSigned()); +Qu

[clang] [clang][analyzer] Correct SMT Layer for _BitInt cases refutations (PR #143310)

2025-06-11 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,22 @@ +// RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -w \ +// RUN: -analyzer-config crosscheck-with-z3=true -verify %s +// REQUIRES: z3 + +// Previously these tests were crashing because the SMTConv layer did not +// comprehend the _BitInt typ

[clang] [clang][analyzer] Correct SMT Layer for _BitInt cases refutations (PR #143310)

2025-06-11 Thread Balazs Benics via cfe-commits
https://github.com/steakhal requested changes to this pull request. https://github.com/llvm/llvm-project/pull/143310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Correct SMT Layer for _BitInt cases refutations (PR #143310)

2025-06-11 Thread Balazs Benics via cfe-commits
@@ -570,23 +572,37 @@ class SMTConv { // TODO: Refactor to put elsewhere static inline QualType getAPSIntType(ASTContext &Ctx, const llvm::APSInt &Int) { -return Ctx.getIntTypeForBitwidth(Int.getBitWidth(), Int.isSigned()); +Qu

[clang] [clang][analyzer] Correct SMT Layer for _BitInt cases refutations (PR #143310)

2025-06-11 Thread Balazs Benics via cfe-commits
@@ -570,23 +572,37 @@ class SMTConv { // TODO: Refactor to put elsewhere static inline QualType getAPSIntType(ASTContext &Ctx, const llvm::APSInt &Int) { -return Ctx.getIntTypeForBitwidth(Int.getBitWidth(), Int.isSigned()); +Qu

[clang] [clang][analyzer] Correct SMT Layer for _BitInt cases refutations (PR #143310)

2025-06-11 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,23 @@ +// RUN: %clang_cc1 -analyze -analyzer-checker=core -w -DNO_CROSSCHECK -verify %s +// RUN: %clang_cc1 -analyze -analyzer-checker=core -w -analyzer-config crosscheck-with-z3=true -verify %s +// REQUIRES: z3 + +// The SMTConv layer did not comprehend _BitInt types

[clang] [clang][analyzer] Correct SMT Layer for _BitInt cases refutations (PR #143310)

2025-06-11 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,23 @@ +// RUN: %clang_cc1 -analyze -analyzer-checker=core -w -DNO_CROSSCHECK -verify %s +// RUN: %clang_cc1 -analyze -analyzer-checker=core -w -analyzer-config crosscheck-with-z3=true -verify %s steakhal wrote: Can we use the usual clang analyzer pla

[clang] [clang][analyzer] Correct SMT Layer for _BitInt cases refutations (PR #143310)

2025-06-11 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,23 @@ +// RUN: %clang_cc1 -analyze -analyzer-checker=core -w -DNO_CROSSCHECK -verify %s +// RUN: %clang_cc1 -analyze -analyzer-checker=core -w -analyzer-config crosscheck-with-z3=true -verify %s +// REQUIRES: z3 + +// The SMTConv layer did not comprehend _BitInt types

[clang] [clang][analyzer] Correct SMT Layer for _BitInt cases refutations (PR #143310)

2025-06-11 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,23 @@ +// RUN: %clang_cc1 -analyze -analyzer-checker=core -w -DNO_CROSSCHECK -verify %s +// RUN: %clang_cc1 -analyze -analyzer-checker=core -w -analyzer-config crosscheck-with-z3=true -verify %s +// REQUIRES: z3 + +// The SMTConv layer did not comprehend _BitInt types

[clang] [clang][analyzer] Correct SMT Layer for _BitInt cases refutations (PR #143310)

2025-06-11 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,23 @@ +// RUN: %clang_cc1 -analyze -analyzer-checker=core -w -DNO_CROSSCHECK -verify %s steakhal wrote: Do we need this RUN line? What scenario it tests? https://github.com/llvm/llvm-project/pull/143310 ___

[clang] [clang][analyzer] Correct SMT Layer for _BitInt cases refutations (PR #143310)

2025-06-11 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,23 @@ +// RUN: %clang_cc1 -analyze -analyzer-checker=core -w -DNO_CROSSCHECK -verify %s +// RUN: %clang_cc1 -analyze -analyzer-checker=core -w -analyzer-config crosscheck-with-z3=true -verify %s +// REQUIRES: z3 + +// The SMTConv layer did not comprehend _BitInt types

[clang] [clang][analyzer] Correct SMT Layer for _BitInt cases refutations (PR #143310)

2025-06-11 Thread Balazs Benics via cfe-commits
https://github.com/steakhal requested changes to this pull request. https://github.com/llvm/llvm-project/pull/143310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Correct SMT Layer for _BitInt cases refutations (PR #143310)

2025-06-10 Thread Balazs Benics via cfe-commits
steakhal wrote: Before I'd continue my review, I'd like a bit more context about the crash. So we ended up with different "sorts", but I feel like that is because we don't capture implicit conversions that would play the role of widening or matching the operands type like standard arithmetic co

[clang] [clang][analyzer] Update python dependency versions (PR #143433)

2025-06-09 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. Thanks for the patch. Merge it at your convinience. https://github.com/llvm/llvm-project/pull/143433 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [clang][analyzer] Update python dependency versions (PR #143433)

2025-06-09 Thread Balazs Benics via cfe-commits
steakhal wrote: Are there other vulns affecting the other deps? Or more recent vulns we should know about the deps you would touch here? https://github.com/llvm/llvm-project/pull/143433 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [clang][analyzer] Correct SMT Layer for _BitInt cases refutations (PR #143310)

2025-06-08 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/143310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [scan-build][Windows] Fix driver name transformation in scan-build (PR #143135)

2025-06-06 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/143135 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang-Tools][Windows] Fix driver name transformation in scan-build (PR #143135)

2025-06-06 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/143135 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang-Tools][Windows] Fix driver name transformation in scan-build (PR #143135)

2025-06-06 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. I've never used scan-build on Windows, but the patch looks harmless so let's fix this. https://github.com/llvm/llvm-project/pull/143135 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] Control analysis-based diagnostics with #pragma (PR #136323)

2025-06-06 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/136323 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Control analysis-based diagnostics with #pragma (PR #136323)

2025-06-06 Thread Balazs Benics via cfe-commits
@@ -16597,7 +16597,8 @@ ExprResult Sema::ActOnBlockStmtExpr(SourceLocation CaretLoc, BD->setCaptures(Context, Captures, BSI->CXXThisCaptureIndex != 0); // Pop the block scope now but keep it alive to the end of this function. - AnalysisBasedWarnings::Policy WP = Analysis

[clang] [clang][CFG] Fix assertion failure in checkIncorrectLogicOperator (PR #142897)

2025-06-05 Thread Balazs Benics via cfe-commits
https://github.com/steakhal commented: I don't think I have much to say. I never really touched floating-point stuff. I left the comments I had while reading though. https://github.com/llvm/llvm-project/pull/142897 ___ cfe-commits mailing list cfe-comm

[clang] [clang][CFG] Fix assertion failure in checkIncorrectLogicOperator (PR #142897)

2025-06-05 Thread Balazs Benics via cfe-commits
@@ -1261,6 +1261,28 @@ class CFGBuilder { L2Result.Val.getKind() == APValue::Float) { llvm::APFloat L1 = L1Result.Val.getFloat(); llvm::APFloat L2 = L2Result.Val.getFloat(); + // Note that L1 and L2 do not necessarily have the same type. For example +

[clang] [clang][CFG] Fix assertion failure in checkIncorrectLogicOperator (PR #142897)

2025-06-05 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,16 @@ +// RUN: %clang_cc1 -verify -Wunreachable-code %s + +// Previously this test will crash +static void test(__fp16& x) { + if (x != 0 || x != 1.0) { // expected-note{{}} steakhal wrote: ```suggestion if (x != 0 || x != 1.0) { // expected-note{{}

[clang] [clang][CFG] Fix assertion failure in checkIncorrectLogicOperator (PR #142897)

2025-06-05 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,16 @@ +// RUN: %clang_cc1 -verify -Wunreachable-code %s + +// Previously this test will crash +static void test(__fp16& x) { + if (x != 0 || x != 1.0) { // expected-note{{}} + x = 0.9; +} else + x = 0.8; // expected-warning{{code will never be executed}}

[clang] [clang][CFG] Fix assertion failure in checkIncorrectLogicOperator (PR #142897)

2025-06-05 Thread Balazs Benics via cfe-commits
@@ -1261,6 +1261,28 @@ class CFGBuilder { L2Result.Val.getKind() == APValue::Float) { llvm::APFloat L1 = L1Result.Val.getFloat(); llvm::APFloat L2 = L2Result.Val.getFloat(); + // Note that L1 and L2 do not necessarily have the same type. For example +

[clang] [clang][CFG] Fix assertion failure in checkIncorrectLogicOperator (PR #142897)

2025-06-05 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/142897 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CFG] Fix assertion failure in checkIncorrectLogicOperator (PR #142897)

2025-06-05 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,16 @@ +// RUN: %clang_cc1 -verify -Wunreachable-code %s + +// Previously this test will crash +static void test(__fp16& x) { steakhal wrote: I think after adding the `no-crash` tag (as in the analyzer community usually do) this comment would become le

[clang] [analyzer][NFCI] Remove ad-hoc program point tagging (PR #142980)

2025-06-05 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/142980 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [StaticAnalyzer] Fix tryExpandAsInteger's failures on PCH macros (PR #142722)

2025-06-05 Thread Balazs Benics via cfe-commits
steakhal wrote: FYI the CI checks are red, I don't think its related to this PR. It had this line: ``` 2025-06-05T08:01:02.4802924Z PASS: Clang :: Analysis/pch_macro.cpp (1263 of 21496) ``` So we should be good to merge, any time you want. https://github.com/llvm/llvm-project/pull/142722 __

[clang] [StaticAnalyzer] Fix tryExpandAsInteger's failures on PCH macros (PR #142722)

2025-06-05 Thread Balazs Benics via cfe-commits
@@ -129,11 +129,19 @@ std::optional tryExpandAsInteger(StringRef Macro, const Preprocessor &PP) { // Parse an integer at the end of the macro definition. const Token &T = FilteredTokens.back(); - // FIXME: EOF macro token coming from a PCH file on macOS while marked as -

[clang] [StaticAnalyzer] Fix tryExpandAsInteger's failures on PCH macros (PR #142722)

2025-06-05 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/142722 >From 3bd12ac6bb3c47b5e977cffec019df15a15426fc Mon Sep 17 00:00:00 2001 From: Ziqing Luo Date: Wed, 4 Jun 2025 12:29:53 +0800 Subject: [PATCH 1/3] [StaticAnalyzer] Fix tryExpandAsInteger's failures on macros f

[clang] [StaticAnalyzer] Fix tryExpandAsInteger's failures on PCH macros (PR #142722)

2025-06-05 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,45 @@ +// RUN: rm -rf %t +// RUN: mkdir -p %t +// RUN: split-file %s %t + +// RUN: %clang_cc1 -x c++ -triple x86_64-apple-macosx10.15.0 -emit-pch -o %t/header.pch %t/header.h +// RUN: %clang_analyze_cc1 -triple x86_64-apple-macosx10.15.0 -include-pch %t/header.pch \ +

[clang] [StaticAnalyzer] Fix tryExpandAsInteger's failures on PCH macros (PR #142722)

2025-06-05 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. Looks great. Much cleaner this way. Thank you! FYI: I also proposed a slight declarative simplification to the RUN lines, I hope you like it. https://github.com/llvm/llvm-project/pull/142722 ___

[clang] [StaticAnalyzer] Fix tryExpandAsInteger's failures on PCH macros (PR #142722)

2025-06-05 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/142722 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [StaticAnalyzer] Fix tryExpandAsInteger's failures on PCH macros (PR #142722)

2025-06-03 Thread Balazs Benics via cfe-commits
@@ -129,11 +129,19 @@ std::optional tryExpandAsInteger(StringRef Macro, const Preprocessor &PP) { // Parse an integer at the end of the macro definition. const Token &T = FilteredTokens.back(); - // FIXME: EOF macro token coming from a PCH file on macOS while marked as -

[clang] [StaticAnalyzer] Fix tryExpandAsInteger's failures on PCH macros (PR #142722)

2025-06-03 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,39 @@ +// RUN: %clang_cc1 -triple x86_64-apple-macosx10.15.0 -emit-pch -o %t %s +// RUN: %clang_analyze_cc1 -triple x86_64-apple-macosx10.15.0 -include-pch %t \ +// RUN: -analyzer-checker=core,apiModeling,unix.StdCLibraryFunctions -verify %s +// +// RUN: %clang_cc1 -

[clang] [StaticAnalyzer] Fix tryExpandAsInteger's failures on PCH macros (PR #142722)

2025-06-03 Thread Balazs Benics via cfe-commits
https://github.com/steakhal requested changes to this pull request. Thank you for the patch. https://github.com/llvm/llvm-project/pull/142722 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] [StaticAnalyzer] Fix tryExpandAsInteger's failures on PCH macros (PR #142722)

2025-06-03 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/142722 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Fix tagging of PostAllocatorCall (PR #142132)

2025-05-30 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. LGTM, thanks. https://github.com/llvm/llvm-project/pull/142132 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [StaticAnalyzer] Remove unused includes (NFC) (PR #141525)

2025-05-26 Thread Balazs Benics via cfe-commits
steakhal wrote: Thanks for sharing your opinion. I think for long term IWYU should be beneficial for our subsubproject, and may enable us to see how the include hierarchy looks like and to restructure and split some headers. https://github.com/llvm/llvm-project/pull/141525

[clang] [StaticAnalyzer] Remove unused includes (NFC) (PR #141525)

2025-05-26 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. I only spotchecked, but it should be good if it still builds. Btw, WDYT of IWYU? Maybe we could improve include hygiene for the static analyzer. https://github.com/llvm/llvm-project/pull/141525

[clang] [NFC][analyzer] Rename getTagDescription to getDebugName (PR #141511)

2025-05-26 Thread Balazs Benics via cfe-commits
=?utf-8?q?Don=C3=A1t?= Nagy Message-ID: In-Reply-To: https://github.com/steakhal approved this pull request. https://github.com/llvm/llvm-project/pull/141511 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [NFC][analyzer] Rename getTagDescription to getDebugName (PR #141511)

2025-05-26 Thread Balazs Benics via cfe-commits
steakhal wrote: In hind sight, maybe "debugTag" is the best of both worlds. WDYT? https://github.com/llvm/llvm-project/pull/141511 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Introduce the check::BlockEntrance checker callback (PR #140924)

2025-05-26 Thread Balazs Benics via cfe-commits
@@ -548,6 +564,8 @@ class CheckerProgramPointTag : public SimpleProgramPointTag { template class Checker : public CHECK1, public CHECKs..., public CheckerBase { public: + using BlockEntrance = clang::BlockEntrance; steakhal wrote: Dont worry. https://githu

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-26 Thread Balazs Benics via cfe-commits
=?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy ,Balazs Benics ,Balazs Benics , =?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-26 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy ,Balazs Benics ,Balazs Benics , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?=

[clang] [StaticAnalyzer] Drop const from a return type (NFC) (PR #141414)

2025-05-25 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. https://github.com/llvm/llvm-project/pull/141414 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Ignore [[clang::flag_enum]] enums in the EnumCastOutOfRange checker (PR #141232)

2025-05-25 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/141232 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Ignore [[clang::flag_enum]] enums in the EnumCastOutOfRange checker (PR #141232)

2025-05-23 Thread Balazs Benics via cfe-commits
steakhal wrote: > Should we still warn if we store a negative value or a value >= 2*last member? I was thinking about this but I chose the simplest way to suppress these. https://github.com/llvm/llvm-project/pull/141232 ___ cfe-commits mailing list cf

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-23 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy ,Balazs Benics ,Balazs Benics , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Repl

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-23 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy ,Balazs Benics ,Balazs Benics , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Repl

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-23 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy ,Balazs Benics ,Balazs Benics , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Repl

[clang] [analyzer] Ignore [[clang::flag_enum]] enums in the EnumCastOutOfRange checker (PR #141232)

2025-05-23 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/141232 Resolves https://github.com/llvm/llvm-project/issues/76208#issuecomment-2830854351 Quoting the docs of `[[clang::flag_enum]]`: https://clang.llvm.org/docs/AttributeReference.html#flag-enum > This attribute ca

[clang] [clang][analyzer] Refine modeling of 'getcwd' in StdCLibraryFunctions checker (PR #141076)

2025-05-22 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. LGTM, thank you for chiming in. https://github.com/llvm/llvm-project/pull/141076 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fixed issue #128882: don't warn if 1st argument to 'getcwd' is NULL (PR #135720)

2025-05-22 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/135720 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fixed issue #128882: don't warn if 1st argument to 'getcwd' is NULL (PR #135720)

2025-05-22 Thread Balazs Benics via cfe-commits
steakhal wrote: Superseded by #141076 https://github.com/llvm/llvm-project/pull/135720 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fixed issue #128882: don't warn if 1st argument to 'getcwd' is NULL (PR #135720)

2025-05-22 Thread Balazs Benics via cfe-commits
@@ -105,9 +105,6 @@ void errno_getcwd(char *Buf, size_t Sz) { clang_analyzer_eval(errno != 0); // expected-warning{{TRUE}} clang_analyzer_eval(Path == NULL); // expected-warning{{TRUE}} if (errno) {} // no warning - } else if (Path == NULL) {

[clang] [clang][analyzer] Refine modeling of 'getcwd' in StdCLibraryFunctions checker (PR #141076)

2025-05-22 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/141076 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fixed issue #128882: don't warn if 1st argument to 'getcwd' is NULL (PR #135720)

2025-05-21 Thread Balazs Benics via cfe-commits
@@ -105,9 +105,6 @@ void errno_getcwd(char *Buf, size_t Sz) { clang_analyzer_eval(errno != 0); // expected-warning{{TRUE}} clang_analyzer_eval(Path == NULL); // expected-warning{{TRUE}} if (errno) {} // no warning - } else if (Path == NULL) {

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-20 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy ,Balazs Benics ,Balazs Benics , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Repl

[clang] Fixed issue #128882: don't warn if 1st argument to 'getcwd' is NULL (PR #135720)

2025-05-20 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/135720 >From cfd32680ac4a534b4060d8cc3549edfe45e721bf Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Mon, 14 Apr 2025 20:58:24 -0400 Subject: [PATCH 1/2] Fixed issue #128882: don't warn if 1st argument to 'getcwd'

[clang] Fixed issue #128882: don't warn if 1st argument to 'getcwd' is NULL (PR #135720)

2025-05-20 Thread Balazs Benics via cfe-commits
@@ -105,9 +105,6 @@ void errno_getcwd(char *Buf, size_t Sz) { clang_analyzer_eval(errno != 0); // expected-warning{{TRUE}} clang_analyzer_eval(Path == NULL); // expected-warning{{TRUE}} if (errno) {} // no warning - } else if (Path == NULL) {

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-20 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy ,Balazs Benics ,Balazs Benics , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -115,9 +115,22 @@ cla

[clang] [clang][analysis] Thread Safety Analysis: Handle parenthesis (PR #140656)

2025-05-20 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. LGTM thanks. https://github.com/llvm/llvm-project/pull/140656 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analysis] Thread Safety Analysis: Handle parenthesis (PR #140656)

2025-05-20 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/140656 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WIP][analyzer] Refactor `ExplodedGraph::trim()` (PR #139939)

2025-05-19 Thread Balazs Benics via cfe-commits
=?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy ,

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-19 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy ,Balazs Benics ,Balazs Benics , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -115,9 +115,22 @@ cla

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-19 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy ,Balazs Benics ,Balazs Benics , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: https://github.com/steakhal commented: T

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-19 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy ,Balazs Benics ,Balazs Benics , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: https://github.com/steakhal edited https

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-18 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: steakhal wrote: > For a moment I was very happy to see this solution, but unfortunately XXX is > **not** the name of the

[clang] [WIP][analyzer] Refactor `ExplodedGraph::trim()` (PR #139939)

2025-05-17 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To:

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-16 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: steakhal wrote: > I agree, but unfortunately there is no way to get the class name > automatically in a platform-indepen

[clang] [WIP][analyzer] Refactor `ExplodedGraph::trim()` (PR #139939)

2025-05-16 Thread Balazs Benics via cfe-commits
steakhal wrote: > I started a measurement on open source projects to see the effect of this > change on the (total) analysis runtime. I don't expect much but if this turns > out to be non-negligible, then I will prioritize this direction. RT is not a concern to me in this case. https://github

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-16 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: steakhal wrote: > Thanks for the patches! I originally thought that renaming > `getTagDescription` -> `getDebugName` wou

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-15 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: steakhal wrote: I think I can't push to your branch. So here is what I'd do as git format-patch: [0001-NFC-Rename-getTag

[clang] [clang][analyzer] Fix a nullptr dereference when -ftime-trace is used (Reland) (PR #139980)

2025-05-15 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/139980 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-15 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: steakhal wrote: > What do you think about this? I don't like this. LLVM is used as a library for wide set of tools and c

[clang] [clang][analyzer] Fix a nullptr dereference when -ftime-trace is used (Reland) (PR #139980)

2025-05-15 Thread Balazs Benics via cfe-commits
steakhal wrote: I'll wait for the premerge checks to show green to avoid more reverts. https://github.com/llvm/llvm-project/pull/139980 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Fix a nullptr dereference when -ftime-trace is used (Reland) (PR #139980)

2025-05-15 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. LGTM. Thanks for the nice discussion. https://github.com/llvm/llvm-project/pull/139980 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang] [clang][analyzer] Fix a nullptr dereference when -ftime-trace is used (Reland) (PR #139980)

2025-05-15 Thread Balazs Benics via cfe-commits
@@ -100,41 +100,7 @@ class SymbolConjured : public SymbolData { ConstCFGElementRef getCFGElementRef() const { return Elem; } // It might return null. - const Stmt *getStmt() const { steakhal wrote: It must have been painful to iterate on this code :D I a

[clang] [WIP][analyzer] Refactor `ExplodedGraph::trim()` (PR #139939)

2025-05-15 Thread Balazs Benics via cfe-commits
@@ -4096,7 +4096,8 @@ std::string ExprEngine::DumpGraph(bool trim, StringRef Filename) { std::string ExprEngine::DumpGraph(ArrayRef Nodes, StringRef Filename) { - std::unique_ptr TrimmedG(G.trim(Nodes)); + TrimGraphWorklist Worklist{Nodes};

[clang] [WIP][analyzer] Refactor `ExplodedGraph::trim()` (PR #139939)

2025-05-15 Thread Balazs Benics via cfe-commits
@@ -4096,7 +4096,8 @@ std::string ExprEngine::DumpGraph(bool trim, StringRef Filename) { std::string ExprEngine::DumpGraph(ArrayRef Nodes, StringRef Filename) { - std::unique_ptr TrimmedG(G.trim(Nodes)); + TrimGraphWorklist Worklist{Nodes};

[clang] [WIP][analyzer] Refactor `ExplodedGraph::trim()` (PR #139939)

2025-05-15 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: steakhal wrote: > I p

  1   2   3   4   5   6   7   8   9   10   >