<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi!<div class=""><br class=""></div><div class="">clang-tidy misc-macro-parentheses checks macros that supplied with command-line arguments.<div class=""><br class=""></div><div class="">Lets say I have simple <font face="Menlo" color="#001e57" class="">foo.c</font>:</div><div class=""><font face="Menlo" color="#002e7a" class="">int main() {};</font></div><div class=""><br class=""></div><div class="">And I write to console:</div><div class=""><br class=""></div><div class=""><font face="Menlo" color="#001e57" class="">clang-tidy foo.c -checks=misc-macro-parentheses -- -DVERSION=1.23-5</font></div><div class=""><font face="Menlo" color="#001e57" class=""><br class=""></font></div><div class="">It prints out </div></div><div class=""><br class=""></div><div class=""><font face="Menlo" color="#001e57" class="">warning: macro replacement list should be enclosed in parentheses [misc-macro-parentheses]<br class=""></font><br class=""></div><div class="">Firstly, it is very hard to find out why it occurs. Secondly, I couldn't figure out how to suppress it. Anybody knows good way to do it? Apart from this. this seems to be a very good check.</div><div class=""><br class=""></div><div class="">I'm using compile_commands.json in my project, so I can't control compiler arguments directly.</div><div class=""><br class=""></div><div class="">Thanks for any help!</div><div class=""><br class=""></div></body></html>