Index: clang/lib/Sema/SemaLookup.cpp =================================================================== --- clang/lib/Sema/SemaLookup.cpp +++ clang/lib/Sema/SemaLookup.cpp @@ -1937,7 +1937,10 @@ LookupNameKind NameKind = R.getLookupKind(); - if (!getLangOpts().CPlusPlus) { + if (!getLangOpts().CPlusPlus || getLangOpts().ObjC) { + // In the case of Objective-C++, try C++ unqualified name lookup first. + if (getLangOpts().CPlusPlus && CppLookupName(R, S)) + return true; // Unqualified name lookup in C/Objective-C is purely lexical, so // search in the declarations attached to the name. if (NameKind == Sema::LookupRedeclarationWithLinkage) {