[PATCH] D70850: [Clang-Tidy] Quick fix for bug in bugprone-macro-parentheses 43804

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Dec 1 07:59:57 PST 2019


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

LGTM, but we may have other things to test (or bugs to fix) here.



================
Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-macro-parentheses.cpp:46
 #define GOOD32(X)         std::vector<X>
+#define GOOD33(x)         if (!a__##x) a_##x = &f(#x)
 
----------------
I'm surprised that `do { /* whatever */ } while (0)` is not tested as being good -- that's a very common idiom.


Repository:
  rCTE Clang Tools Extra

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70850/new/

https://reviews.llvm.org/D70850





More information about the cfe-commits mailing list