[PATCH] D116059: [Clang][CFG] check children statements of asm goto
Eli Friedman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 6 12:24:44 PST 2022
efriedma added a comment.
Yes, messed up the warning flag.
Did some brief experiments on trunk; I'd like to see the following two testcases as regression tests:
int a(int z) {
int x;
if (z)
asm goto ("":"=r"(x):::A1,A2);
return 0;
A1:
A2:
return x; // expected warning: conditional use of uninitialized var
}
int b() {
int x = 0;
asm goto ("":"=r"(x):::A1,A2);
return 0;
A1:
A2:
return x; // expected warning: use of uninitialized variable
}
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116059/new/
https://reviews.llvm.org/D116059
More information about the cfe-commits
mailing list