-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Closed
Labels
clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerclang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"
Description
This warns (as it should):
$ cat test.cc
struct S {};
void g() {
S s1 = s1;
}
$ out/gn/bin/clang -c test.cc
test.cc:4:10: warning: variable 's1' is uninitialized when used within its own initialization [-Wuninitialized]
4 | S s1 = s1;
| ~~ ^~
1 warning generated.
This doesn't (but should, too):
$ cat test.cc
struct S {};
void g() {
S s2 = [&]() { return s2; }();
}
$ out/gn/bin/clang -c test.cc
# No diag
Metadata
Metadata
Assignees
Labels
clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerclang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"