[clang] [clang][Sema][Tests] Add test coverage for function-like macro diagnostic edge cases and C++ (PR #223895)
Mariya Podchishchaeva via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 17 09:00:31 PDT 2026
================
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+// Regression test for the "function-like macro used without parens"
+// diagnostic added in https://github.com/llvm/llvm-project/pull/123495.
+// Confirms the same diagnostic fires correctly in C++ (not just C),
+// since the implementation lives in the shared SemaExpr.cpp.
+
+#define BAZ() 1
----------------
Fznamznon wrote:
We prefer to not add new tests for just a single case. Any chance you could fit that into an existing file?
https://github.com/llvm/llvm-project/pull/223895
More information about the cfe-commits
mailing list