[llvm] [LLVM][AsmParser] Add support for C style comments (PR #111554)

Rahul Joshi via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 1 10:15:57 PDT 2024


================
@@ -251,6 +258,12 @@ lltok::Kind LLLexer::LexToken() {
     case ',': return lltok::comma;
     case '*': return lltok::star;
     case '|': return lltok::bar;
+    case '/':
+      if (peekNextChar() != '*')
----------------
jurahul wrote:

Right, Thanks. I have reverted that part of the change and the code is now using getNextChar() directly. That entailed handling EOF following a * within a comment, so added another unit test for that.

https://github.com/llvm/llvm-project/pull/111554


More information about the llvm-commits mailing list