aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Parse/Action.h
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2009-12-11 20:04:54 +0000
committerJohn McCall <rjmccall@apple.com>2009-12-11 20:04:54 +0000
commite7e278bce2301990107cef3f873cbbf7da94469a (patch)
tree12f51a760758256e6f1cbcccaccca7fc837018a2 /include/clang/Parse/Action.h
parentef96eac2b83e2ed62144bb25b051d09a02296fe0 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91146 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Parse/Action.h')
-rw-r--r--include/clang/Parse/Action.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/clang/Parse/Action.h b/include/clang/Parse/Action.h
index 011d611782..b7540f9993 100644
--- a/include/clang/Parse/Action.h
+++ b/include/clang/Parse/Action.h
@@ -365,8 +365,19 @@ public:
return 0;
}
+ /// ShouldEnterDeclaratorScope - Called when a C++ scope specifier
+ /// is parsed as part of a declarator-id to determine whether a scope
+ /// should be entered.
+ ///
+ /// \param S the current scope
+ /// \param SS the scope being entered
+ /// \param isFriendDeclaration whether this is a friend declaration
+ virtual bool ShouldEnterDeclaratorScope(Scope *S, const CXXScopeSpec &SS) {
+ return false;
+ }
+
/// ActOnCXXEnterDeclaratorScope - Called when a C++ scope specifier (global
- /// scope or nested-name-specifier) is parsed, part of a declarator-id.
+ /// scope or nested-name-specifier) is parsed as part of a declarator-id.
/// After this method is called, according to [C++ 3.4.3p3], names should be
/// looked up in the declarator-id's scope, until the declarator is parsed and
/// ActOnCXXExitDeclaratorScope is called.