aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2011-02-21 17:31:28 +0000
committerFariborz Jahanian <fjahanian@apple.com>2011-02-21 17:31:28 +0000
commitb0c2301a40a3e54ce7195f11a59d025ef60ebffb (patch)
tree1ea1a53e8ff9c7f5891322c1644570cd10f8e4ec
parentfef8b344ea299a1717cc94486f5df6facf3e337c (diff)
Remove warning on future change in ivar lookup rule
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
-rw-r--r--include/clang/Basic/DiagnosticSemaKinds.td5
-rw-r--r--lib/Sema/SemaExpr.cpp14
-rw-r--r--test/SemaObjC/conflict-nonfragile-abi2.m8
3 files changed, 6 insertions, 21 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index 2e7f274b8e..fabd21b674 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -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).
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 65b57c30cd..84baa7d985 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -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
diff --git a/test/SemaObjC/conflict-nonfragile-abi2.m b/test/SemaObjC/conflict-nonfragile-abi2.m
index 86947cf764..5d6b2810fc 100644
--- a/test/SemaObjC/conflict-nonfragile-abi2.m
+++ b/test/SemaObjC/conflict-nonfragile-abi2.m
@@ -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 {