From 18d90a97df6ddc4aa8701705841a72a9292f0946 Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Fri, 13 Aug 2010 18:09:39 +0000 Subject: When issuing warning for future conflict resolution, (nonfragile-abi2), do not consider 'ivar' access in class methods. Also, improve on diagnostics. Radar 8304561. llvm-svn: 111023 --- clang/lib/Sema/SemaExpr.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'clang/lib/Sema/SemaExpr.cpp') diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index f7b450d2c9d..59d0328d6e1 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -1142,6 +1142,8 @@ Sema::OwningExprResult Sema::ActOnIdExpression(Scope *S, return ActOnIdExpression(S, SS, Id, HasTrailingLParen, isAddressOfOperand); } + // for further use, this must be set to false if in class method. + IvarLookupFollowUp = getCurMethodDecl()->isInstanceMethod(); } } @@ -1193,6 +1195,7 @@ Sema::OwningExprResult Sema::ActOnIdExpression(Scope *S, 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()) { -- cgit v1.2.3