[PATCH] D30841: [clang-tidy] readability-misleading-indentation: fix chained if
Alexander Kornienko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 16 07:36:51 PDT 2017
alexfh requested changes to this revision.
alexfh added a comment.
This revision now requires changes to proceed.
Thank you for the fix! One comment inline.
================
Comment at: clang-tidy/readability/MisleadingIndentationCheck.cpp:40-42
+ for (auto Iter = ChainedIfs.find(If); Iter != ChainedIfs.end();
+ Iter = ChainedIfs.find(Iter->second))
+ IfLoc = Iter->second->getIfLoc();
----------------
Can you just use the parent map to get the previous `if` in the chain?
https://reviews.llvm.org/D30841
More information about the cfe-commits
mailing list