[cfe-commits] r126128 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaExpr.cpp test/SemaObjC/conflict-nonfragile-abi2.m
Fariborz Jahanian
fjahanian at apple.com
Mon Feb 21 09:31:28 PST 2011
Author: fjahanian
Date: Mon Feb 21 11:31:28 2011
New Revision: 126128
URL: http://llvm.org/viewvc/llvm-project?rev=126128&view=rev
Log:
Remove warning on future change in ivar lookup rule
when doing the property default synthesis.
// rdar://9027673.
Modified:
cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
cfe/trunk/lib/Sema/SemaExpr.cpp
cfe/trunk/test/SemaObjC/conflict-nonfragile-abi2.m
Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=126128&r1=126127&r2=126128&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Mon Feb 21 11:31:28 2011
@@ -2950,10 +2950,7 @@
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).
Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=126128&r1=126127&r2=126128&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Mon Feb 21 11:31:28 2011
@@ -1675,20 +1675,6 @@
// 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
Modified: cfe/trunk/test/SemaObjC/conflict-nonfragile-abi2.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/conflict-nonfragile-abi2.m?rev=126128&r1=126127&r2=126128&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/conflict-nonfragile-abi2.m (original)
+++ cfe/trunk/test/SemaObjC/conflict-nonfragile-abi2.m Mon Feb 21 11:31:28 2011
@@ -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
- at property int glob; // expected-note {{property declared here}}
+ at property int glob;
@property int p;
@property int le;
@property int l;
@@ -12,8 +12,10 @@
@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 {
More information about the cfe-commits
mailing list