aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2011-03-15 17:27:48 +0000
committerFariborz Jahanian <fjahanian@apple.com>2011-03-15 17:27:48 +0000
commit4eb7f69515c059c64e87ed32cdbeb743ec6ec03d (patch)
treed1cf56ac3870d277e60e48330dedc656bd6b1446 /lib/Sema/SemaExpr.cpp
parent4ddb3871307376d27d0f276c9da0ecce0384f01f (diff)
Don't poke into redefined 'id' type looking for a property
declaration as this results in a confusing error message, instead of message related to missing property declaration. // rdar://9106929 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127682 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r--lib/Sema/SemaExpr.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index d0528b1bc3..7ef3348bdc 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -3905,8 +3905,9 @@ Sema::LookupMemberExpr(LookupResult &R, Expr *&BaseExpr,
MemberLoc, BaseExpr));
}
}
-
- if (ShouldTryAgainWithRedefinitionType(*this, BaseExpr))
+ // Use of id.member can only be for a property reference. Do not
+ // use the 'id' redefinition in this case.
+ if (IsArrow && ShouldTryAgainWithRedefinitionType(*this, BaseExpr))
return LookupMemberExpr(R, BaseExpr, IsArrow, OpLoc, SS,
ObjCImpDecl, HasTemplateArgs);