objective-C string literal has no side-effect,

resulting in issuance of unused static variable
warning now. // rdar://10777111

llvm-svn: 161291
This commit is contained in:
Fariborz Jahanian 2012-08-04 01:24:33 +00:00
parent a01741fce4
commit 29489a9e9e
2 changed files with 3 additions and 0 deletions

View File

@ -2315,6 +2315,7 @@ public:
bool VisitIntegerLiteral(const IntegerLiteral *E) { return false; }
bool VisitFloatingLiteral(const FloatingLiteral *E) { return false; }
bool VisitStringLiteral(const StringLiteral *E) { return false; }
bool VisitObjCStringLiteral(const ObjCStringLiteral *E) { return false; }
bool VisitCharacterLiteral(const CharacterLiteral *E) { return false; }
bool VisitUnaryExprOrTypeTraitExpr(const UnaryExprOrTypeTraitExpr *E)
{ return false; }

View File

@ -51,3 +51,5 @@ void test2() {
}
@end
// rdar://10777111
static NSString *x = @"hi"; // expected-warning {{unused variable 'x'}}