[clang] [clang-tools-extra] Associate documentation comments with macro definitions (PR #198452)
Egor Zhdan via cfe-commits
cfe-commits at lists.llvm.org
Wed May 20 04:21:02 PDT 2026
================
@@ -0,0 +1,27 @@
+// Run lines are sensitive to line numbers and come below the code.
+
+/// Greeting count.
+#define HELLO 1
+
+#define BARE 2
+
+/**
+ * \brief Add two numbers.
+ */
+#define SUM(x, y) ((x) + (y))
+
+#define TRAILING 3 ///< Trailing macro doc.
+
----------------
egorzhdan wrote:
Is it worth having a test with a redefined macro? e.g.
```cpp
/// abc
#define REDEFINED 123
/// def
#define REDEFINED 456
```
https://github.com/llvm/llvm-project/pull/198452
More information about the cfe-commits
mailing list