martong added a comment. I think we should avoid `auto` when using `State->get<>` because the type is not immediate for the reader. (Unlike in a `cast<T>`.)
================ Comment at: clang/lib/StaticAnalyzer/Checkers/ErrnoModeling.cpp:198 // The special errno region should never garbage collected. - if (const auto *ErrnoR = getErrnoRegion(State)) + if (const auto *ErrnoR = State->get<ErrnoRegion>()) SR.markLive(ErrnoR); ---------------- ================ Comment at: clang/lib/StaticAnalyzer/Checkers/ObjCSelfInitChecker.cpp:108 if (SymbolRef sym = val.getAsSymbol()) - if (const unsigned *attachedFlags = state->get<SelfFlag>(sym)) + if (const auto *attachedFlags = state->get<SelfFlag>(sym)) return (SelfFlagEnum)*attachedFlags; ---------------- I'd rather keep the type here. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126802/new/ https://reviews.llvm.org/D126802 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits