[PATCH] D54579: [clang-tidy] Update checks to play nicely with limited traversal scope added in r346847

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 15 06:48:08 PST 2018


hokein accepted this revision.
hokein added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: clang-tidy/readability/SimplifyBooleanExprCheck.cpp:567
     replaceCompoundReturnWithCondition(Result, Compound, true);
-  else if (const auto TU = Result.Nodes.getNodeAs<Decl>("top"))
-    Visitor(this, Result).TraverseDecl(const_cast<Decl*>(TU));
+  else // MatchOnce matcher
+    Visitor(this, Result).TraverseAST(*Result.Context);
----------------
Ah, what I mean is `assert(MatchedOnce)`.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D54579





More information about the cfe-commits mailing list