Don't enter a new scope for a namespace-qualified declarator unless we're
in a file context. In well-formed code, only happens with friend functions.
Fixes PR 5760.
llvm-svn: 91146
diff --git a/clang/lib/Sema/Sema.h b/clang/lib/Sema/Sema.h
index aed7a9b..baf9c23 100644
--- a/clang/lib/Sema/Sema.h
+++ b/clang/lib/Sema/Sema.h
@@ -2048,6 +2048,8 @@
SourceRange TypeRange,
SourceLocation CCLoc);
+ virtual bool ShouldEnterDeclaratorScope(Scope *S, const CXXScopeSpec &SS);
+
/// ActOnCXXEnterDeclaratorScope - Called when a C++ scope specifier (global
/// scope or nested-name-specifier) is parsed, part of a declarator-id.
/// After this method is called, according to [C++ 3.4.3p3], names should be