[clang] [clang][analyzer] Add C standard streams to the internal memory space (PR #147766)

2025-07-09 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat commented: The code change LGTM, my only suggestion is about word choices in a comment. It's nice to see that this commit cleans up some ugly false positives :) https://github.com/llvm/llvm-project/pull/147766 ___ cfe-comm

[clang] [analyzer] Prettify checker registration and unittest code (PR #147797)

2025-07-10 Thread Donát Nagy via cfe-commits
NagyDonat wrote: I discussed with @Szelethus (in person) that I'll be waiting for his opinion before merging this. https://github.com/llvm/llvm-project/pull/147797 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [analyzer] Prettify checker registration and unittest code (PR #147797)

2025-07-10 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/147797 From fc638a1d7d56becbe7e8350b46b75ade51718f71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Tue, 20 May 2025 15:51:48 +0200 Subject: [PATCH 1/8] [analyzer] Prettify checker registration an

[clang] [analyzer] Prettify checker registration and unittest code (PR #147797)

2025-07-10 Thread Donát Nagy via cfe-commits
@@ -112,26 +112,35 @@ class CheckerRegistry { return true; } -public: - /// Adds a checker to the registry. Use this non-templated overload when your - /// checker requires custom initialization. - void addChecker(RegisterCheckerFn Fn, ShouldRegisterFunction sfn, + /

[clang] [clang][analyzer] Add C standard streams to the internal memory space (PR #147766)

2025-07-10 Thread Donát Nagy via cfe-commits
@@ -1054,10 +1054,26 @@ const VarRegion *MemRegionManager::getVarRegion(const VarDecl *D, assert(!Ty.isNull()); if (Ty.isConstQualified()) { sReg = getGlobalsRegion(MemRegion::GlobalImmutableSpaceRegionKind); -} else if (Ctx.getSourceManager().isInSystemHeade

[clang] [clang][analyzer] Add C standard streams to the internal memory space (PR #147766)

2025-07-10 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat approved this pull request. https://github.com/llvm/llvm-project/pull/147766 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Add C standard streams to the internal memory space (PR #147766)

2025-07-10 Thread Donát Nagy via cfe-commits
NagyDonat wrote: > BTW wouldn't this patch break the semantics of `freopen`? That one should > invalidate the file ptr, right? Could you demonstrate this? No, `freopen` should _not_ invalidate the file _ptr_, because it modifies the stream object (associating it with a different file) _without

[clang] [analyzer] Prettify checker registration and unittest code (PR #147797)

2025-07-21 Thread Donát Nagy via cfe-commits
@@ -139,10 +139,9 @@ class SValTest : public testing::TestWithParam {}; \ void add##NAME##SValCollector(AnalysisASTConsumer &AnalysisConsumer, \ AnalyzerO

[clang] [analyzer] Prettify checker registration and unittest code (PR #147797)

2025-07-21 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/147797 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Prettify checker registration and unittest code (PR #147797)

2025-07-21 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/147797 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Prettify checker registration and unittest code (PR #147797)

2025-07-21 Thread Donát Nagy via cfe-commits
@@ -139,10 +139,9 @@ class SValTest : public testing::TestWithParam {}; \ void add##NAME##SValCollector(AnalysisASTConsumer &AnalysisConsumer, \ AnalyzerO

[clang] [analyzer] Prettify checker registration and unittest code (PR #147797)

2025-07-21 Thread Donát Nagy via cfe-commits
NagyDonat wrote: @Szelethus I implemented the changes that you suggested in person. @steakhal FYI I reduced the scope of this change: - I turned `DocsUri` into an optional argument (with a default value) instead of outright removing it from the `public` overloads. - I removed `addMockChecker` b

[clang] [analyzer] Prettify checker registration and unittest code (PR #147797)

2025-07-21 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/147797 From fc638a1d7d56becbe7e8350b46b75ade51718f71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Tue, 20 May 2025 15:51:48 +0200 Subject: [PATCH 01/11] [analyzer] Prettify checker registration

<    11   12   13   14   15   16