]> granicus.if.org Git - clang/commitdiff
fix a problem causing us to lose the ''s around objc interface names
authorChris Lattner <sabre@nondot.org>
Sun, 11 Apr 2010 07:04:01 +0000 (07:04 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 11 Apr 2010 07:04:01 +0000 (07:04 +0000)
in a diagnostic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100956 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaExprObjC.cpp
test/SemaObjC/class-method-lookup.m
test/SemaObjC/warn-selector-selection.m

index 99db910a90ef3a7e183b441fc743198378617288..a05687e0cb396d3e32e60a7b7be859eac3a3b7b7 100644 (file)
@@ -650,7 +650,7 @@ Sema::ExprResult Sema::ActOnInstanceMessage(ExprTy *receiver, Selector Sel,
                                Sel, SourceRange(lbrac,rbrac));
           if (Method && !OCIType->getInterfaceDecl()->isForwardDecl())
             Diag(lbrac, diag::warn_maynot_respond)
-              << OCIType->getInterfaceDecl()->getIdentifier()->getName() << Sel;
+              << OCIType->getInterfaceDecl()->getIdentifier() << Sel;
         }
       }
     }
index f1269f2f4610e6993b4575f79775a2e035ee2121..f26d692328a2349f7c59597b33d5f8f3ff8875a7 100644 (file)
@@ -40,7 +40,7 @@
 id foo(void) {
   Object *obj;
   id obj2 = obj;
-  [obj setWindow:nil]; // expected-warning {{Object may not respond to 'setWindow:'}}
+  [obj setWindow:nil]; // expected-warning {{'Object' may not respond to 'setWindow:'}}
 
   return obj;
 }
index 96ed77c14bef3b89fa123d6d8ce0a856d0fc18cb..e395f43464ed357a63e5b0c4051fc63eb8d86f5b 100644 (file)
@@ -10,5 +10,5 @@
 
 void foo(void) {
   Object *obj;
-  [obj setWindow:0]; // expected-warning{{Object may not respond to 'setWindow:'}}
+  [obj setWindow:0]; // expected-warning{{'Object' may not respond to 'setWindow:'}}
 }