[PATCH] D69876: Allow output constraints on "asm goto"

Nick Desaulniers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 18 11:18:01 PST 2019


nickdesaulniers added inline comments.


================
Comment at: clang/lib/Analysis/UninitializedValues.cpp:830
+
+  for (unsigned i = 0, e = as->getNumOutputs(); i != e; ++i) {
+    FindVarResult Var = findVar(as->getOutputExpr(i));
----------------
`GCCAsmStmt` inherits from `AsmStmt` which has an `outputs()` method for returning an iterator. Please use that an a range based for loop.


================
Comment at: clang/lib/Analysis/UninitializedValues.cpp:877
+    if (as->isAsmGoto())
+      tf.Visit(const_cast<GCCAsmStmt *>(as));
   return vals.updateValueVectorWithScratch(block);
----------------
Don't declare `as` as `const`, then you won't need this `const_cast`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69876





More information about the cfe-commits mailing list