================
@@ -431,6 +431,12 @@ class DeadStoreObs : public LiveVariables::Observer {
// bug.
if (isa<ParmVarDecl>(VD) && VD->getType()->isScalarType())
return;
+ // Special case: check for self-initializations.
+ //
+ // e.g. int x = x;
+ //
+ if (VD == V)
----------------
AaronBallman wrote:
I don't think we need to support those cases in this PR but I do think having
test coverage for them with some FIXMEs so that it's documented we thought
about this.
https://github.com/llvm/llvm-project/pull/187530
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits