[PATCH] D70638: [Diagnostic] add a warning which warns about misleading indentation
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 3 06:59:15 PST 2019
aaron.ballman accepted this revision.
aaron.ballman added a comment.
LGTM with some minor nits.
================
Comment at: clang/lib/Parse/ParseStmt.cpp:1219
+ void Check() {
+
+ NeedsChecking = false;
----------------
Spurious whitespace, but it would be useful to add a newline above the `Check()` declaration for visual separation.
================
Comment at: clang/lib/Parse/ParseStmt.cpp:1239
+ !Tok.isAtStartOfLine())) {
+ if (SM.getPresumedLineNumber(StmtLoc) ==
+ SM.getPresumedLineNumber(Tok.getLocation()))
----------------
This can be hoisted (negated) into the preceding `if` statement.
================
Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:2532
+ if (Val.getAsLocSymbol() == Sym) {
+ const VarRegion *VR = MR->getBaseRegion()->getAs<VarRegion>();
+ // Do not show local variables belonging to a function other than
----------------
xbolva00 wrote:
> Please land as separated NFCI commit.
Yeah, these changes seem unrelated to the patch.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70638/new/
https://reviews.llvm.org/D70638
More information about the cfe-commits
mailing list