From: Nick Lewycky Date: Tue, 3 Apr 2012 20:26:45 +0000 (+0000) Subject: Don't treat synthesized ivars as being in the base class for the purpose of X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=893a6eaf52930701950b7fc01a2478bb86899b77;p=clang Don't treat synthesized ivars as being in the base class for the purpose of looking up visible decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153967 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaLookup.cpp b/lib/Sema/SemaLookup.cpp index adbfedc641..9fb248ed5b 100644 --- a/lib/Sema/SemaLookup.cpp +++ b/lib/Sema/SemaLookup.cpp @@ -38,14 +38,14 @@ #include "llvm/ADT/TinyPtrVector.h" #include "llvm/ADT/edit_distance.h" #include "llvm/Support/ErrorHandling.h" +#include +#include #include #include +#include #include -#include -#include #include -#include -#include +#include using namespace clang; using namespace sema; @@ -2984,7 +2984,7 @@ static void LookupVisibleDecls(DeclContext *Ctx, LookupResult &Result, if (IFace->getImplementation()) { ShadowContextRAII Shadow(Visited); LookupVisibleDecls(IFace->getImplementation(), Result, - QualifiedNameLookup, true, Consumer, Visited); + QualifiedNameLookup, InBaseClass, Consumer, Visited); } } else if (ObjCProtocolDecl *Protocol = dyn_cast(Ctx)) { for (ObjCProtocolDecl::protocol_iterator I = Protocol->protocol_begin(), diff --git a/test/Index/complete-synthesized.m b/test/Index/complete-synthesized.m index 81f1ba186f..216481a5c1 100644 --- a/test/Index/complete-synthesized.m +++ b/test/Index/complete-synthesized.m @@ -43,4 +43,4 @@ // CHECK: ObjCIvarDecl:{ResultType float}{TypedText _prop2} (35) // CHECK-NOT: prop2 // CHECK-NOT: prop3 -// CHECK: ObjCIvarDecl:{ResultType double}{TypedText _prop4} (37) +// CHECK: ObjCIvarDecl:{ResultType double}{TypedText _prop4} (35)