[clang-tools-extra] [clang-tidy] add 'IgnoreMarcos' option to 'avoid-goto' check (PR #143554)
Carlos Galvez via cfe-commits
cfe-commits at lists.llvm.org
Sun Jun 15 11:07:33 PDT 2025
================
@@ -50,3 +50,12 @@ Modern C++ needs ``goto`` only to jump out of nested loops.
some_operation();
All other uses of ``goto`` are diagnosed in `C++`.
+
+
+Options
+-------
+
+.. option:: IgnoreMacros
+
+ If set to `true`, the check will not warn if both label and ``goto``
+ statement are placed inside a macro. Default is `true`.
----------------
carlosgalvezp wrote:
Since `goto` is such a "bad" thing in C++, I'd be inclined to have this `false` by default (which also keeps the same functionality as on trunk).
https://github.com/llvm/llvm-project/pull/143554
More information about the cfe-commits
mailing list