https://llvm.org/bugs/show_bug.cgi?id=31781
Bug ID: 31781
Summary: -Wunused-const-variable doesn't warn for ObjC types if
ARC is enabled
Product: clang
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
// test.m
static id const kIdConstant = @"abc";
static const int kIntConstant = 123;
int main(int argc, char const *argv[])
{
return 0;
}
> clang -o test test.m -framework Foundation -Wunused-const-variable
test.m:3:17: warning: unused variable 'kIdConstant' [-Wunused-const-variable]
static id const kIdConstant = @"abc";
^
test.m:4:18: warning: unused variable 'kIntConstant' [-Wunused-const-variable]
static const int kIntConstant = 123;
^
2 warnings generated.
> clang -o test test.m -framework Foundation -Wunused-const-variable -fobjc-arc
test.m:4:18: warning: unused variable 'kIntConstant' [-Wunused-const-variable]
static const int kIntConstant = 123;
^
1 warning generated.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs