[PATCH] D22312: [MC] Cleanup Error Handling in AsmParser

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 15 13:19:19 PDT 2016


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

lgtm

Thanks!


================
Comment at: lib/MC/MCParser/AsmParser.cpp:254
@@ +253,3 @@
+
+  bool getTokenLoc(SMLoc &l) {
+    l = getTok().getLoc();
----------------
Prevailing local conventions would make these and the 'i' local below upper case.

================
Comment at: lib/MC/MCParser/AsmParser.cpp:334
@@ -310,1 +333,3 @@
 
+  bool check(bool c, SMLoc l, const Twine &Msg) {
+    if (c)
----------------
upper case local variable names

================
Comment at: lib/MC/MCParser/ELFAsmParser.cpp:634
@@ -631,1 +633,3 @@
 
+  if (getLexer().isNot(AsmToken::EndOfStatement))
+    return TokError("unexpected token in '.ident' directive");
----------------
This can be parseToken, right?


https://reviews.llvm.org/D22312





More information about the llvm-commits mailing list