diff options
author | Richard Trieu <rtrieu@google.com> | 2011-09-20 20:03:50 +0000 |
---|---|---|
committer | Richard Trieu <rtrieu@google.com> | 2011-09-20 20:03:50 +0000 |
commit | c11030ea936f6952deb5a1423ce1648173cd417e (patch) | |
tree | 9b289b2e19db291291d211ad25ad8abe8210ca28 /lib | |
parent | bf5851a9f2ba2323b96626bbd78de45c0db1da95 (diff) |
Fix a problem in digraph handling where "[:" might be treated as "<::" and
erronously trigger the digraph correction fix-it. Include a new test to catch
this in the future.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140175 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Parse/ParseExprCXX.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Parse/ParseExprCXX.cpp b/lib/Parse/ParseExprCXX.cpp index 89953fd3d8..baec6fdd73 100644 --- a/lib/Parse/ParseExprCXX.cpp +++ b/lib/Parse/ParseExprCXX.cpp @@ -75,7 +75,7 @@ static void FixDigraph(Parser &P, Preprocessor &PP, Token &DigraphToken, void Parser::CheckForTemplateAndDigraph(Token &Next, ParsedType ObjectType, bool EnteringContext, IdentifierInfo &II, CXXScopeSpec &SS) { - if (!Next.is(tok::l_square) || !Next.getLength() == 2) + if (!Next.is(tok::l_square) || Next.getLength() != 2) return; Token SecondToken = GetLookAheadToken(2); |