================
@@ -0,0 +1,37 @@
+// RUN: %check_clang_tidy -check-suffixes=ALLOWBOOL -std=c++98-or-later %s
readability-redundant-nested-if %t -- -config='{CheckOptions:
{readability-redundant-nested-if.AllowUserDefinedBoolConversion: true}}' --
-fno-delayed-template-parsing
+
+
+bool cond(int X = 0);
+int side_effect();
+void sink();
+void bar();
+
+struct BoolLike {
+ operator bool() const;
+};
+
+BoolLike make_bool_like();
+
+#define INNER_IF(C) if (C) sink()
+#define COND_MACRO cond()
+#define OUTER_IF if (cond())
----------------
vbvictor wrote:
Duplicate code can be placed in per-check test include (see include directories
with check names).
https://github.com/llvm/llvm-project/pull/181558
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits