[llvm-branch-commits] [cfe-branch] r111243 - in /cfe/branches/Apple/whitney-IB/src/tools/clang: ./ include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaExpr.cpp test/SemaObjC/conflict-nonfragile-abi2.m

Daniel Dunbar daniel at zuster.org
Tue Aug 17 09:25:44 PDT 2010


Author: ddunbar
Date: Tue Aug 17 11:25:44 2010
New Revision: 111243

URL: http://llvm.org/viewvc/llvm-project?rev=111243&view=rev
Log:
--- Merging r111023 into 'src/tools/clang':
U    src/tools/clang/test/SemaObjC/conflict-nonfragile-abi2.m
U    src/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td
U    src/tools/clang/lib/Sema/SemaExpr.cpp


Modified:
    cfe/branches/Apple/whitney-IB/src/tools/clang/   (props changed)
    cfe/branches/Apple/whitney-IB/src/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td
    cfe/branches/Apple/whitney-IB/src/tools/clang/lib/Sema/SemaExpr.cpp
    cfe/branches/Apple/whitney-IB/src/tools/clang/test/SemaObjC/conflict-nonfragile-abi2.m

Propchange: cfe/branches/Apple/whitney-IB/src/tools/clang/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Aug 17 11:25:44 2010
@@ -1 +1 @@
-/cfe/trunk:110882,110901,110906,110933,110950,110979
+/cfe/trunk:110882,110901,110906,110933,110950,110979,111023

Modified: cfe/branches/Apple/whitney-IB/src/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney-IB/src/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td?rev=111243&r1=111242&r2=111243&view=diff
==============================================================================
--- cfe/branches/Apple/whitney-IB/src/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/branches/Apple/whitney-IB/src/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td Tue Aug 17 11:25:44 2010
@@ -2516,8 +2516,10 @@
   "place parentheses around the assignment to silence this warning">;
 
 def warn_ivar_variable_conflict : Warning<
-  "%0 lookup will access the property ivar in nonfragile-abi2 mode">, 
+  "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).
 // In most of these diagnostics the %2 is a value from the

Modified: cfe/branches/Apple/whitney-IB/src/tools/clang/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney-IB/src/tools/clang/lib/Sema/SemaExpr.cpp?rev=111243&r1=111242&r2=111243&view=diff
==============================================================================
--- cfe/branches/Apple/whitney-IB/src/tools/clang/lib/Sema/SemaExpr.cpp (original)
+++ cfe/branches/Apple/whitney-IB/src/tools/clang/lib/Sema/SemaExpr.cpp Tue Aug 17 11:25:44 2010
@@ -1138,6 +1138,8 @@
           return ActOnIdExpression(S, SS, Id, HasTrailingLParen,
                                    isAddressOfOperand);
       }
+      // for further use, this must be set to false if in class method.
+      IvarLookupFollowUp = getCurMethodDecl()->isInstanceMethod();
     }
   }
 
@@ -1189,6 +1191,7 @@
       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);
       }
     }
   } else if (FunctionDecl *Func = R.getAsSingle<FunctionDecl>()) {

Modified: cfe/branches/Apple/whitney-IB/src/tools/clang/test/SemaObjC/conflict-nonfragile-abi2.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney-IB/src/tools/clang/test/SemaObjC/conflict-nonfragile-abi2.m?rev=111243&r1=111242&r2=111243&view=diff
==============================================================================
--- cfe/branches/Apple/whitney-IB/src/tools/clang/test/SemaObjC/conflict-nonfragile-abi2.m (original)
+++ cfe/branches/Apple/whitney-IB/src/tools/clang/test/SemaObjC/conflict-nonfragile-abi2.m Tue Aug 17 11:25:44 2010
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 -fobjc-nonfragile-abi -verify -fsyntax-only %s
 // rdar : // 8225011
 
-int glob;
+int glob; // expected-note {{global variable declared here}}
 
 @interface I
 @property int glob; // expected-note {{property declared here}}
@@ -13,7 +13,7 @@
 @end
 
 @implementation I
-- (int) Meth { return glob; } // expected-warning {{'glob' lookup will access the property ivar in nonfragile-abi2 mode}}
+- (int) Meth { return glob; } // expected-warning {{when default property synthesis is on, 'glob' lookup will access}}
 @synthesize glob;
 // rdar: // 8248681
 - (int) Meth1: (int) p {





More information about the llvm-branch-commits mailing list