[PATCH] D116059: [Clang][CFG] check children statements of asm goto

Nick Desaulniers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 20 16:23:26 PST 2021


nickdesaulniers added inline comments.


================
Comment at: clang/lib/Analysis/UninitializedValues.cpp:826
+        // it as potentially uninitialized for those cases where it's used on
+        // an indirect path, where it's not guaranteed to be defined.
         vals[VD] = MayUninitialized;
----------------
efriedma wrote:
> The old and the new code here seem to be doing very different things.  It isn't clear why.
> 
> Actually, I'm not sure why we're checking whether the variable is initialized.  Whether the variable is initialized going into the inline asm isn't really related to whether it's initialized when we exit the inline asm.  For register outputs, the output isn't even in the same register as the old value of the variable.
I suspect we're now eagerly marking variables initialized by visiting the child nodes, which we weren't doing previously.

See also: https://reviews.llvm.org/D71314.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116059



More information about the cfe-commits mailing list