[Lldb-commits] [clang] [clang-tools-extra] [lldb] [llvm] [clang-doc] Add regression test for test comments in macros (PR #132360)

Paul Kirth via lldb-commits lldb-commits at lists.llvm.org
Fri Mar 21 09:35:19 PDT 2025


================
@@ -0,0 +1,32 @@
+// RUN: rm -rf %t && mkdir -p %t
+// RUN: clang-doc --format=md --doxygen --output=%t --executor=standalone %s
+// RUN: clang-doc --format=html --doxygen --output=%t --executor=standalone %s
+// RUN: FileCheck %s < %t/GlobalNamespace/MyClass.md --check-prefix=MD-MyClass-LINE
+// RUN: FileCheck %s < %t/GlobalNamespace/MyClass.md --check-prefix=MD-MyClass
+// RUN: FileCheck %s < %t/GlobalNamespace/MyClass.html --check-prefix=HTML-MyClass-LINE
+// RUN: FileCheck %s < %t/GlobalNamespace/MyClass.html --check-prefix=HTML-MyClass
+
+#define DECLARE_METHODS                                           \
+    /**    
+     * @brief Declare a method to calculate the sum of two numbers
----------------
ilovepi wrote:

> I also rarely see this kind comment in comments, whether in books or in real projects. But this issue display like this. Maybe I understood this wrongly.

ah, no, I've confused this with a different issue. Apologies. I should take my own advice not to review code first thing in the morning XD. Lets just make it syntactically correct using trailing `\`. If the markdown comes out w/ an extra `\`, we can file a bug for that and handle that separately.

You can confirm what's going on by dumping the AST from clang, or by using some of the debug output from clang-doc. 


https://github.com/llvm/llvm-project/pull/132360


More information about the lldb-commits mailing list