diff options
| author | Richard Trieu <rtrieu@google.com> | 2012-05-03 01:09:59 +0000 |
|---|---|---|
| committer | Richard Trieu <rtrieu@google.com> | 2012-05-03 01:09:59 +0000 |
| commit | 2cdcf82396b5e745f153d1503491007a988291df (patch) | |
| tree | be342814e75dfa5e6bfe72836e147776431039c3 /llvm/lib/Object/Archive.cpp | |
| parent | 78453eed1219b83dff87d34a4bbbe48cc65eda70 (diff) | |
| download | bcm5719-llvm-2cdcf82396b5e745f153d1503491007a988291df.tar.gz bcm5719-llvm-2cdcf82396b5e745f153d1503491007a988291df.zip | |
Fix a note without a SourceLocation.
#define TEST int y; int x = y;
void foo() {
TEST
}
-Wuninitialized gives this warning:
invalid-loc.cc:4:3: warning: variable 'y' is uninitialized when used here
[-Wuninitialized]
TEST
^~~~
invalid-loc.cc:2:29: note: expanded from macro 'TEST'
#define TEST int y; int x = y;
^
note: initialize the variable 'y' to silence this warning
1 warning generated.
The second note lacks filename, line number, and code snippet. This change
will remove the fixit and only point to variable declaration.
invalid-loc.cc:4:3: warning: variable 'y' is uninitialized when used here
[-Wuninitialized]
TEST
^~~~
invalid-loc.cc:2:29: note: expanded from macro 'TEST'
#define TEST int y; int x = y;
^
invalid-loc.cc:4:3: note: variable 'y' is declared here
TEST
^
invalid-loc.cc:2:14: note: expanded from macro 'TEST'
#define TEST int y; int x = y;
^
1 warning generated.
llvm-svn: 156045
Diffstat (limited to 'llvm/lib/Object/Archive.cpp')
0 files changed, 0 insertions, 0 deletions

