Charusso added a comment. Thanks you @NoQ for the great idea!
Without the duplicated `BugReport.cpp` reports it could be an on-by-default patch, see: Before: F8685549: before.html <https://reviews.llvm.org/F8685549> After: F8685550: after.html <https://reviews.llvm.org/F8685550> It is not perfect, but I like that and I have already got ideas how to use these new pieces. ================ Comment at: lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:187-190 + // The value may hard-coded. + SVal HardCodedSVal = State->getSVal(CondVarExpr, LCtx); + if (auto HardCodedCI = HardCodedSVal.getAs<nonloc::ConcreteInt>()) + return &HardCodedCI->getValue(); ---------------- NoQ wrote: > I don't see this triggered on tests. It looks to me that this function is for > now only applied to `DeclRefExpr`s that are always glvalues and therefore > should never be evaluated to a `nonloc` value. Good catch! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53076/new/ https://reviews.llvm.org/D53076 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits