-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillaclang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"wontfixIssue is real, but we can't or won't fix it. Not invalidIssue is real, but we can't or won't fix it. Not invalid
Description
| Bugzilla Link | 9079 |
| Resolution | WONTFIX |
| Resolved on | Jan 31, 2011 13:51 |
| Version | trunk |
| OS | MacOS X |
| Attachments | example |
| Reporter | LLVM Bugzilla Contributor |
| CC | @tkremenek |
Extended Description
If a local is initialized within some 'if' guarded by a condition and later is accessed only if that same condition is true, clang emits a warning.
The case I just hit in my code has structure similar to this:
int x(int y)
{
int value;
if (y != 0) {
value = 0;
}
switch (y) {
case 0:
return 1; // handles the uninitialized case
default:
return value; // can only get here if the value=0 line was executed
}
}
This is probably a duplicate, but this test case may be different enough.
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillaclang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"wontfixIssue is real, but we can't or won't fix it. Not invalidIssue is real, but we can't or won't fix it. Not invalid