File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ // Regression test for https://github.com/llvm/llvm-project/issues/59819
2
+
3
+ // RUN: rm -rf %t && mkdir -p %t
4
+ // RUN: clang-doc --format=md --doxygen --output=%t --executor=standalone %s
5
+ // RUN: FileCheck %s < %t/GlobalNamespace/MyClass.md --check-prefix=MD-MYCLASS-LINE
6
+ // RUN: FileCheck %s < %t/GlobalNamespace/MyClass.md --check-prefix=MD-MYCLASS
7
+
8
+ // RUN: clang-doc --format=html --doxygen --output=%t --executor=standalone %s
9
+ // RUN: FileCheck %s < %t/GlobalNamespace/MyClass.html --check-prefix=HTML-MYCLASS-LINE
10
+ // RUN: FileCheck %s < %t/GlobalNamespace/MyClass.html --check-prefix=HTML-MYCLASS
11
+
12
+ #define DECLARE_METHODS \
13
+ /* *
14
+ * @brief Declare a method to calculate the sum of two numbers
15
+ */ \
16
+ int Add (int a, int b) { \
17
+ return a + b; \
18
+ }
19
+
20
+ // MD-MYCLASS: ### Add
21
+ // MD-MYCLASS: *public int Add(int a, int b)*
22
+ // MD-MYCLASS: **brief** Declare a method to calculate the sum of two numbers
23
+
24
+ // HTML-MYCLASS: <p>public int Add(int a, int b)</p>
25
+ // HTML-MYCLASS: <div>brief</div>
26
+ // HTML-MYCLASS: <p> Declare a method to calculate the sum of two numbers</p>
27
+
28
+
29
+ class MyClass {
30
+ public:
31
+ // MD-MYCLASS-LINE: *Defined at {{.*}}clang-tools-extra{{[\/]}}test{{[\/]}}clang-doc{{[\/]}}comments-in-macros.cpp#[[@LINE+2]]*
32
+ // HTML-MYCLASS-LINE: <p>Defined at line [[@LINE+1]] of file {{.*}}clang-tools-extra{{[\/]}}test{{[\/]}}clang-doc{{[\/]}}comments-in-macros.cpp</p>
33
+ DECLARE_METHODS
34
+ };
35
+
You can’t perform that action at this time.
0 commit comments