[PATCH] D31700: [clang-tidy] Ignore blank spaces between cast's ")" and its sub expr.

Alexander Kornienko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 16 07:57:15 PDT 2017


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

Sorry, missed your patch somehow. LG with one nit.



================
Comment at: clang-tidy/google/AvoidCStyleCastsCheck.cpp:139
           ")");
+      ReplaceRange = CharSourceRange::getCharRange(CastExpr->getLParenLoc(),
+                                                   SubExpr->getLocStart());
----------------
Why is this only done on non-parenthesized expressions? Will `(int)  (b)` turn into `static_cast<int>  (b)` as well?


https://reviews.llvm.org/D31700





More information about the cfe-commits mailing list