https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98605
--- Comment #1 from Matheus Izvekov <mizvekov at gmail dot com> --- By the way, FYII it is also possible to suppress clang-tidy specific diagnostics on specific lines with a "comment pragma", like so (untested): // NOLINT(bugprone-dangling-handle) // NOLINTNEXTLINE(bugprone-dangling-handle) This might be better than having the linter parse different code than the real compiler, while avoiding these kinds of problems where its hard to test every define combination.