[PATCH] D75563: [clang][Parse] properly parse asm-qualifiers, asm inline

Nick Desaulniers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 11 14:42:00 PDT 2020


nickdesaulniers added inline comments.


================
Comment at: clang/lib/Parse/ParseStmtAsm.cpp:937
+    case AQ_goto: return "goto";
+    case AQ_unspecified:;
+  }
----------------
aaron.ballman wrote:
> This looks wrong to me -- it flows through to an unreachable despite being reachable. I think this should `return "unspecified";`.
This method is only called for printing; it seems weird to return "unspecified" when it's kind of an invariant that that should never happen.  Maybe an assert here would be better?

I've updated the implementation slightly, but leaving this comment thread open for more feedback.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75563/new/

https://reviews.llvm.org/D75563





More information about the cfe-commits mailing list