diff options
author | Julie Hockett <juliehockett@google.com> | 2018-03-09 03:16:39 +0000 |
---|---|---|
committer | Julie Hockett <juliehockett@google.com> | 2018-03-09 03:16:39 +0000 |
commit | 671812462ae1b24c514e88b0116ac9f3c9cc594b (patch) | |
tree | 59021bde995a58ee3c1641f9b372d69a51db1030 /clang-tools-extra/test/clang-doc/mapper-class-in-class.cpp | |
parent | 81e911cd868252e2e788ae1b82fb1ac5b56fd1f6 (diff) | |
download | bcm5719-llvm-671812462ae1b24c514e88b0116ac9f3c9cc594b.tar.gz bcm5719-llvm-671812462ae1b24c514e88b0116ac9f3c9cc594b.zip |
[clang-doc] Setup clang-doc frontend framework
Setting up the mapper part of the frontend framework for a clang-doc
tool. It creates a series of relevant matchers for declarations, and
uses the ToolExecutor to traverse the AST and extract the matching
declarations and comments. The mapper serializes the extracted
information to individual records for reducing and eventually doc
generation.
For a more detailed overview of the tool, see the design document on the
mailing list: http://lists.llvm.org/pipermail/cfe-dev/2017-December/056203.html
Differential Revision: https://reviews.llvm.org/D41102
llvm-svn: 327102
Diffstat (limited to 'clang-tools-extra/test/clang-doc/mapper-class-in-class.cpp')
-rw-r--r-- | clang-tools-extra/test/clang-doc/mapper-class-in-class.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/clang-tools-extra/test/clang-doc/mapper-class-in-class.cpp b/clang-tools-extra/test/clang-doc/mapper-class-in-class.cpp new file mode 100644 index 00000000000..909f00d55cb --- /dev/null +++ b/clang-tools-extra/test/clang-doc/mapper-class-in-class.cpp @@ -0,0 +1,35 @@ +// RUN: rm -rf %t +// RUN: mkdir %t +// RUN: echo "" > %t/compile_flags.txt +// RUN: cp "%s" "%t/test.cpp" +// RUN: clang-doc --dump-mapper -doxygen -p %t %t/test.cpp -output=%t/docs +// RUN: llvm-bcanalyzer %t/docs/bc/641AB4A3D36399954ACDE29C7A8833032BF40472.bc --dump | FileCheck %s --check-prefix CHECK-X-Y +// RUN: llvm-bcanalyzer %t/docs/bc/CA7C7935730B5EACD25F080E9C83FA087CCDC75E.bc --dump | FileCheck %s --check-prefix CHECK-X + +class X { + class Y {}; +}; + +// CHECK-X: <BLOCKINFO_BLOCK/> +// CHECK-X-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4> + // CHECK-X-NEXT: <Version abbrevid=4 op0=1/> +// CHECK-X-NEXT: </VersionBlock> +// CHECK-X-NEXT: <RecordBlock NumWords={{[0-9]*}} BlockCodeSize=4> + // CHECK-X-NEXT: <USR abbrevid=4 op0=20 op1=202 op2=124 op3=121 op4=53 op5=115 op6=11 op7=94 op8=172 op9=210 op10=95 op11=8 op12=14 op13=156 op14=131 op15=250 op16=8 op17=124 op18=205 op19=199 op20=94/> + // CHECK-X-NEXT: <Name abbrevid=5 op0=1/> blob data = 'X' + // CHECK-X-NEXT: <DefLocation abbrevid=7 op0=9 op1={{[0-9]*}}/> blob data = '{{.*}}' + // CHECK-X-NEXT: <TagType abbrevid=9 op0=3/> +// CHECK-X-NEXT: </RecordBlock> + + +// CHECK-X-Y: <BLOCKINFO_BLOCK/> +// CHECK-X-Y-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4> + // CHECK-X-Y-NEXT: <Version abbrevid=4 op0=1/> +// CHECK-X-Y-NEXT: </VersionBlock> +// CHECK-X-Y-NEXT: <RecordBlock NumWords={{[0-9]*}} BlockCodeSize=4> + // CHECK-X-Y-NEXT: <USR abbrevid=4 op0=20 op1=100 op2=26 op3=180 op4=163 op5=211 op6=99 op7=153 op8=149 op9=74 op10=205 op11=226 op12=156 op13=122 op14=136 op15=51 op16=3 op17=43 op18=244 op19=4 op20=114/> + // CHECK-X-Y-NEXT: <Name abbrevid=5 op0=1/> blob data = 'Y' + // CHECK-X-Y-NEXT: <Namespace abbrevid=6 op0=1 op1=40/> blob data = 'CA7C7935730B5EACD25F080E9C83FA087CCDC75E' + // CHECK-X-Y-NEXT: <DefLocation abbrevid=7 op0=10 op1={{[0-9]*}}/> blob data = '{{.*}}' + // CHECK-X-Y-NEXT: <TagType abbrevid=9 op0=3/> +// CHECK-X-Y-NEXT: </RecordBlock> |