http://llvm.org/bugs/show_bug.cgi?id=15558
Bug ID: 15558
Summary: False positive for -Wunused-variable with static
member of internal-linkage type
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
$ cat test.cc
namespace {
class Bar {};
}
class Foo {
static Bar b;
};
$ clang -fsyntax-only -Wunused-variable test.cc
test.cc:5:14: warning: unused variable 'b' [-Wunused-variable]
static Bar b;
^
In the actual code I found this in, 'Foo' and 'Bar' are defined in foo.h, which
is included into both foo.cc, which uses 'b', and foo_test.cc, which doesn't
use 'b'; we produce a warning when compiling foo_test.cc.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs