ASDenysPetrov added inline comments.
================ Comment at: clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:599-603 + const SourceLocation Loc = [&SM](Decl *D) -> SourceLocation { + const Stmt *Body = D->getBody(); + SourceLocation SL = Body ? Body->getBeginLoc() : D->getLocation(); + return SM.getExpansionLoc(SL); + }(D); ---------------- Why don't just leave this snippet as it was but add `const SourceLocation Loc` instead of re-assigning `SL`? Your construction made me stumbled for a while. As this patch is meant to bring readability, I wouldn't like to see such a code-trick. I see your intention to hide `SL` but IMO let compiler do this for us. See suggested. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114441/new/ https://reviews.llvm.org/D114441 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits