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

Bill Wendling via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 21 12:36:42 PST 2021


void 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;
----------------
nickdesaulniers wrote:
> 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.
I'm very confused as well. You're basically going from a strong statement - (This variable is initialized) - to a weaker statement - (This variable may be uninitialized). That doesn't make a lot of sense to me. Could you explain it better in the comment?


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