Improvements and fixes for name lookup with using directives, from Piotr Rak!
Also, put Objective-C protocols into their own identifier
namespace. Otherwise, we find protocols when we don't want to in C++
(but not in C).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63877 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h
index 975c5e1..7d36291 100644
--- a/lib/Sema/Sema.h
+++ b/lib/Sema/Sema.h
@@ -836,8 +836,8 @@
public:
/// Determines whether D is a suitable lookup result according to the
/// lookup criteria.
- bool isAcceptableLookupResult(Decl *D, LookupNameKind NameKind,
- unsigned IDNS) const {
+ static bool isAcceptableLookupResult(Decl *D, LookupNameKind NameKind,
+ unsigned IDNS) {
switch (NameKind) {
case Sema::LookupOrdinaryName:
case Sema::LookupTagName:
@@ -856,7 +856,7 @@
}
assert(false &&
- "isNameAcceptableLookupResult always returns before this point");
+ "isAcceptableLookupResult always returns before this point");
return false;
}