[PATCH] MC: handle '//' correctly in AsmLexer::isAtStartOfComment()

Saleem Abdulrasool compnerd at compnerd.org
Sat Jul 19 14:29:38 PDT 2014


================
Comment at: lib/MC/MCParser/AsmLexer.cpp:466
@@ -464,1 +465,3 @@
+    return Char == CommentString[0] && *CurPtr == CommentString[1];
+  return Char == *CommentString;
 }
----------------
Im not sure I like this approach.  Having the special comment string being taken care of by looking at both the user supplied input and the internal pointer makes me uneasy.  If we want to use the internal cursor to check the current position, then drop the argument and make check purely internal.

http://reviews.llvm.org/D4597






More information about the llvm-commits mailing list