aboutsummaryrefslogtreecommitdiff
path: root/include/clang
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2011-09-19 19:01:00 +0000
committerRichard Trieu <rtrieu@google.com>2011-09-19 19:01:00 +0000
commit950be71c745409e373ae8a834490f9026c8ac222 (patch)
tree95ce520a30c48013c7b777567c2022120e48e1d0 /include/clang
parent8c6f9c49e6b1af5917f5879aed5496d0886b4e90 (diff)
Changes to the name lookup have caused a regression in the digraph fix-it hint.
For instance: template <class T> void E() {}; class F {}; void test() { ::E<::F>(); E<::F>(); } Gives the following error messages: error: found '<::' after a template name which forms the digraph '<:' (aka '[') and a ':', did you mean '< ::'? ::E<::F>(); ^~~ < :: error: expected expression E<::F>(); ^ error: expected ']' note: to match this '[' E<::F>(); This patch adds the digraph fix-it check right before the name lookup, moves the shared checking code to a new function, and adds new tests to catch future regressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140039 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r--include/clang/Parse/Parser.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/clang/Parse/Parser.h b/include/clang/Parse/Parser.h
index d32c36efbd..ee2dbd5519 100644
--- a/include/clang/Parse/Parser.h
+++ b/include/clang/Parse/Parser.h
@@ -1237,6 +1237,10 @@ private:
// C++ Expressions
ExprResult ParseCXXIdExpression(bool isAddressOfOperand = false);
+ void CheckForTemplateAndDigraph(Token &Next, ParsedType ObjectTypePtr,
+ bool EnteringContext, IdentifierInfo &II,
+ CXXScopeSpec &SS);
+
bool ParseOptionalCXXScopeSpecifier(CXXScopeSpec &SS,
ParsedType ObjectType,
bool EnteringContext,