[all-commits] [llvm/llvm-project] 246431: [clang] Fix suppressing diagnostics for uninitiali...
Igor Kudrin via All-commits
all-commits at lists.llvm.org
Mon Jul 14 14:01:32 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2464313eef01c5b1edf0eccf57a32cdee01472c7
https://github.com/llvm/llvm-project/commit/2464313eef01c5b1edf0eccf57a32cdee01472c7
Author: Igor Kudrin <ikudrin at accesssoftek.com>
Date: 2025-07-14 (Mon, 14 Jul 2025)
Changed paths:
M clang/lib/Sema/AnalysisBasedWarnings.cpp
A clang/test/SemaCXX/warn-no-sometimes-uninitialized.cpp
Log Message:
-----------
[clang] Fix suppressing diagnostics for uninitialized variables (#148336)
When one kind of diagnostics is disabled, this should not preclude other
diagnostics from displaying, even if they have lower priority. For
example, this should print a warning about passing an uninitialized
variable as a const reference:
```
> cat test.cpp
void foo(const int &);
int f(bool a) {
int v;
if (a) {
foo(v);
v = 5;
}
return v;
}
> clang test.cpp -fsyntax-only -Wuninitialized -Wno-sometimes-uninitialized
```
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list