================ @@ -453,7 +450,7 @@ void ClassifyRefs::VisitCallExpr(CallExpr *CE) { const auto *UO = dyn_cast<UnaryOperator>(Ex); if (UO && UO->getOpcode() == UO_AddrOf) Ex = UO->getSubExpr(); - classify(Ex, Ignore); + classify(Ex, Use); ---------------- zygoloid wrote:
> Your suggestion does not cover the case: > > ``` > void foo(const int *); > void test() { > int v; > foo(&v); > } > ``` Correct. We intentionally don't warn on that -- a "const reference use" is neither treated as initializing nor as using the local variable. https://github.com/llvm/llvm-project/pull/147221 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits