]> granicus.if.org Git - clang/commitdiff
Remove warning on future change in ivar lookup rule
authorFariborz Jahanian <fjahanian@apple.com>
Mon, 21 Feb 2011 17:31:28 +0000 (17:31 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Mon, 21 Feb 2011 17:31:28 +0000 (17:31 +0000)
when doing the property default synthesis.
// rdar://9027673.

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

include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaExpr.cpp
test/SemaObjC/conflict-nonfragile-abi2.m

index 2e7f274b8ed5a1c3425a348ee71b96389d6b650b..fabd21b674f050a2921ca3d1be7ba21aa4b93c66 100644 (file)
@@ -2950,10 +2950,7 @@ def note_equality_comparison_silence : Note<
 def warn_synthesized_ivar_access : Warning<
   "direct access of synthesized ivar by using property access %0">,
   InGroup<NonfragileAbi2>, DefaultIgnore;
-def warn_ivar_variable_conflict : Warning<
-  "when default property synthesis is on, "
-  "%0 lookup will access property ivar instead of global variable">, 
-  InGroup<NonfragileAbi2>;
+
 def note_global_declared_at : Note<"global variable declared here">;
 
 // assignment related diagnostics (also for argument passing, returning, etc).
index 65b57c30cd7da6b688df2c68239df85077e2683b..84baa7d98525b2ee096d6a4339909b692fbae2f9 100644 (file)
@@ -1675,20 +1675,6 @@ ExprResult Sema::ActOnIdExpression(Scope *S,
   // This is guaranteed from this point on.
   assert(!R.empty() || ADL);
 
-  if (VarDecl *Var = R.getAsSingle<VarDecl>()) {
-    if (getLangOptions().ObjCNonFragileABI && IvarLookupFollowUp &&
-        !(getLangOptions().ObjCDefaultSynthProperties && 
-          getLangOptions().ObjCNonFragileABI2) &&
-        Var->isFileVarDecl()) {
-      ObjCPropertyDecl *Property = canSynthesizeProvisionalIvar(II);
-      if (Property) {
-        Diag(NameLoc, diag::warn_ivar_variable_conflict) << Var->getDeclName();
-        Diag(Property->getLocation(), diag::note_property_declare);
-        Diag(Var->getLocation(), diag::note_global_declared_at);
-      }
-    }
-  }
-
   // Check whether this might be a C++ implicit instance member access.
   // C++ [class.mfct.non-static]p3:
   //   When an id-expression that is not part of a class member access
index 86947cf7643ca823f554a819cbc17de6df90d363..5d6b2810fc10505999637a12f59d12a11fb0bb47 100644 (file)
@@ -1,10 +1,10 @@
 // RUN: %clang_cc1 -fobjc-nonfragile-abi -verify -fsyntax-only %s
 // rdar://8225011
 
-int glob; // expected-note {{global variable declared here}}
+int glob;
 
 @interface I
-@property int glob; // expected-note {{property declared here}}
+@property int glob;
 @property int p;
 @property int le;
 @property int l;
@@ -12,8 +12,10 @@ int glob; // expected-note {{global variable declared here}}
 @property int r;
 @end
 
+// rdar://9027673
+// Warning on future name lookup rule is removed.
 @implementation I
-- (int) Meth { return glob; } // expected-warning {{when default property synthesis is on, 'glob' lookup will access}}
+- (int) Meth { return glob; } // no warning
 @synthesize glob;
 // rdar://8248681
 - (int) Meth1: (int) p {