aboutsummaryrefslogtreecommitdiff
path: root/include/clang
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-08-22 00:34:47 +0000
committerDouglas Gregor <dgregor@apple.com>2009-08-22 00:34:47 +0000
commitd83d04041f64a2c89123d227fa8003b482391279 (patch)
treecff3c814385b448dfc048774b1ba787dfd188f0b /include/clang
parentc141086bff9c2809aa46efdc5ce66756430f3470 (diff)
Implement delayed parsing for member function templates. Fixes PR4608.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79709 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r--include/clang/Parse/Parser.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/include/clang/Parse/Parser.h b/include/clang/Parse/Parser.h
index 2b48d9f212..ef8e48b7e6 100644
--- a/include/clang/Parse/Parser.h
+++ b/include/clang/Parse/Parser.h
@@ -462,7 +462,13 @@ private:
struct LexedMethod {
Action::DeclPtrTy D;
CachedTokens Toks;
- explicit LexedMethod(Action::DeclPtrTy MD) : D(MD) {}
+
+ /// \brief Whether this member function had an associated template
+ /// scope. When true, D is a template declaration.
+ /// othewise, it is a member function declaration.
+ bool TemplateScope;
+
+ explicit LexedMethod(Action::DeclPtrTy MD) : D(MD), TemplateScope(false) {}
};
/// LateParsedDefaultArgument - Keeps track of a parameter that may
@@ -489,11 +495,17 @@ private:
/// until the class itself is completely-defined, such as a default
/// argument (C++ [class.mem]p2).
struct LateParsedMethodDeclaration {
- explicit LateParsedMethodDeclaration(Action::DeclPtrTy M) : Method(M) { }
+ explicit LateParsedMethodDeclaration(Action::DeclPtrTy M)
+ : Method(M), TemplateScope(false) { }
/// Method - The method declaration.
Action::DeclPtrTy Method;
+ /// \brief Whether this member function had an associated template
+ /// scope. When true, D is a template declaration.
+ /// othewise, it is a member function declaration.
+ bool TemplateScope;
+
/// DefaultArgs - Contains the parameters of the function and
/// their default arguments. At least one of the parameters will
/// have a default argument, but all of the parameters of the