-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debug info not generated correctly for function static variables #19612
Comments
Looks like we're missing the lexical block for the inner range. |
Same issue is true for typedef and records (struct, union, and class). |
*** Bug llvm/llvm-bugzilla-archive#23164 has been marked as a duplicate of this bug. *** |
*** Bug llvm/llvm-bugzilla-archive#44695 has been marked as a duplicate of this bug. *** |
Another attempt to fix this
|
mentioned in issue llvm/llvm-bugzilla-archive#23164 |
mentioned in issue llvm/llvm-bugzilla-archive#44695 |
Extended Description
#include<stdio.h>
int main() {
static int X = 10;
{
static bool X = false;
printf("...");
}
printf("...");
}
If you compile the code above with clang 3.4 and break at the printf() statements (gdb or lldb) then p X will always show X to be 10. The same code compiled with GCC shows X to be false in the first case and 10 in the second as expected.
The text was updated successfully, but these errors were encountered: