<html><body><div><br><br>On 19 Sep, 2011,at 09:01 PM, Richard Trieu <rtrieu@google.com> wrote:<br><br></div><div><blockquote type="cite"><div class="msg-quote"><div class="_stretch">--- cfe/trunk/lib/Parse/ParseExprCXX.cpp (original)<br>
+++ cfe/trunk/lib/Parse/ParseExprCXX.cpp Mon Sep 19 14:01:00 2011<br>
@@ -70,6 +70,31 @@<br>
     PP.EnterToken(DigraphToken);<br>
 }<br>
 <br>
+// Check for '<::' which should be '< ::' instead of '[:' when following<br>
+// a template name.<br>
+void Parser::CheckForTemplateAndDigraph(Token &Next, ParsedType ObjectType,<br>
+                                        bool EnteringContext,<br>
+                                        IdentifierInfo &II, CXXScopeSpec &SS) {<br>
+  if (!Next.is(tok::l_square) || !Next.getLength() == 2)<br>
+    return;</div></div></blockquote><br></div><div><span>Is that second exclamation mark right? I think you wanted to write:</span></div><div><span>...   !(Next.getLength() == 2))</span></div><div><span><br></span></div><div><span>Or:</span></div><div><span>...   Next.getLength() != 2)</span></div><div><span><br></span></div><div><span>Right? Because now you are applying the ! operator to the length...</span></div><div><span><br></span></div><div>The current code gives a warning on MSVC:</div><div><br></div><div><div>C:\data\clang-llvm\llvm\tools\clang\lib\Parse\ParseExprCXX.cpp(78) : warning C4806: '==' : unsafe operation: no value of</div><div> type 'bool' promoted to type 'int' can equal the given constant</div></div><div><br></div><div>So when you are implementing warnings, it would be nice if clang did something along those lines. ;-)</div><div><br></div><div>-- Erik.</div></body></html>