Applying parentheses for statement leads to compilation error. Bug [[ 43804 | https://bugs.llvm.org/show_bug.cgi?id=43804 ]] is a compilation error suggested by a wrong fix of this checker. This patch is a quick fix for this issue.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LGTM, but we may have other things to test (or bugs to fix) here.
clang-tools-extra/test/clang-tidy/checkers/bugprone-macro-parentheses.cpp | ||
---|---|---|
46 | I'm surprised that do { /* whatever */ } while (0) is not tested as being good -- that's a very common idiom. |
Comment Actions
Oh yes, this check seems a bit incomplete, more statements are missing, but this particular issue was a showstopper in our internal CI loop. (We had to disable this check because of this.)
I'm surprised that do { /* whatever */ } while (0) is not tested as being good -- that's a very common idiom.