[clang-doc] Create a script to generate tests

Upstreaming the script I use to generate clang-doc tests (and updating
the existing tests to use it)

Differential Revision: https://reviews.llvm.org/D49268

llvm-svn: 337632
This commit is contained in:
Julie Hockett 2018-07-20 23:00:34 +00:00
parent f99752b66b
commit b218069826
24 changed files with 1828 additions and 1383 deletions

View File

@ -0,0 +1,200 @@
#!/usr/bin/env python3
#
#===- gen_tests.py - clang-doc test generator ----------------*- python -*--===#
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
#===------------------------------------------------------------------------===#
"""
clang-doc test generator
==========================
Generates tests for clang-doc given a certain set of flags, a prefix for the
test file, and a given clang-doc binary. Please check emitted tests for
accuracy before using.
To generate all current tests:
- Generate mapper tests:
gen_tests.py -flag='--dump-mapper' -flag='--doxygen' -prefix mapper
- Generate reducer tests:
gen_tests.py -flag='--dump-intermediate' -flag='--doxygen' -prefix bc
- Generate yaml tests:
gen_tests.py -flag='--format=yaml' -flag='--doxygen' -prefix yaml
This script was written on/for Linux, and has not been tested on any other
platform and so it may not work.
"""
import argparse
import glob
import os
import shutil
import subprocess
RUN_CLANG_DOC = """
// RUN: clang-doc {0} -p %t %t/test.cpp -output=%t/docs
"""
RUN = """
// RUN: {0} %t/{1} | FileCheck %s --check-prefix CHECK-{2}
"""
CHECK = '// CHECK-{0}: '
CHECK_NEXT = '// CHECK-{0}-NEXT: '
def clear_test_prefix_files(prefix, tests_path):
if os.path.isdir(tests_path):
for root, dirs, files in os.walk(tests_path):
for filename in files:
if filename.startswith(prefix):
os.remove(os.path.join(root, filename))
def copy_to_test_file(test_case_path, test_cases_path):
# Copy file to 'test.cpp' to preserve file-dependent USRs
test_file = os.path.join(test_cases_path, 'test.cpp')
shutil.copyfile(test_case_path, test_file)
return test_file
def run_clang_doc(args, out_dir, test_file):
# Run clang-doc.
current_cmd = [args.clangdoc]
current_cmd.extend(args.flags)
current_cmd.append('--output=' + out_dir)
current_cmd.append(test_file)
print('Running ' + ' '.join(current_cmd))
return_code = subprocess.call(current_cmd)
if return_code:
return 1
return 0
def get_test_case_code(test_case_path, flags):
# Get the test case code
code = ''
with open(test_case_path, 'r') as code_file:
code = code_file.read()
code += RUN_CLANG_DOC.format(flags)
return code
def get_output(root, out_file, case_out_path, flags, checkname, bcanalyzer):
output = ''
run_cmd = ''
if '--dump-mapper' in flags or '--dump-intermediate' in flags:
# Run llvm-bcanalyzer
output = subprocess.check_output(
[bcanalyzer, '--dump',
os.path.join(root, out_file)])
output = output[:output.find('Summary of ')].rstrip()
run_cmd = RUN.format('llvm-bcanalyzer --dump',
os.path.join('docs', 'bc', out_file), checkname)
else:
# Run cat
output = subprocess.check_output(['cat', os.path.join(root, out_file)])
run_cmd = RUN.format(
'cat',
os.path.join('docs', os.path.relpath(root, case_out_path),
out_file), checkname)
# Format output.
output = output.replace('blob data = \'test\'', 'blob data = \'{{.*}}\'')
output = CHECK.format(checkname) + output.rstrip()
output = run_cmd + output.replace('\n',
'\n' + CHECK_NEXT.format(checkname))
return output + '\n'
def main():
parser = argparse.ArgumentParser(description='Generate clang-doc tests.')
parser.add_argument(
'-flag',
action='append',
default=[],
dest='flags',
help='Flags to pass to clang-doc.')
parser.add_argument(
'-prefix',
type=str,
default='',
dest='prefix',
help='Prefix for this test group.')
parser.add_argument(
'-clang-doc-binary',
dest='clangdoc',
metavar="PATH",
default='clang-doc',
help='path to clang-doc binary')
parser.add_argument(
'-llvm-bcanalyzer-binary',
dest='bcanalyzer',
metavar="PATH",
default='llvm-bcanalyzer',
help='path to llvm-bcanalyzer binary')
args = parser.parse_args()
flags = ' '.join(args.flags)
clang_doc_path = os.path.dirname(__file__)
tests_path = os.path.join(clang_doc_path, '..', 'test', 'clang-doc')
test_cases_path = os.path.join(tests_path, 'test_cases')
clear_test_prefix_files(args.prefix, tests_path)
for test_case_path in glob.glob(os.path.join(test_cases_path, '*')):
if test_case_path.endswith(
'compile_flags.txt') or test_case_path.endswith(
'compile_commands.json'):
continue
# Name of this test case
case_name = os.path.basename(test_case_path).split('.')[0]
test_file = copy_to_test_file(test_case_path, test_cases_path)
out_dir = os.path.join(test_cases_path, case_name)
if run_clang_doc(args, out_dir, test_file):
return 1
# Retrieve output and format as FileCheck tests
all_output = ''
num_outputs = 0
for root, dirs, files in os.walk(out_dir):
for out_file in files:
# Make the file check the first 3 letters (there's a very small chance
# that this will collide, but the fix is to simply change the decl name)
usr = os.path.basename(out_file).split('.')
# If the usr is less than 2, this isn't one of the test files.
if len(usr) < 2:
continue
all_output += get_output(root, out_file, out_dir, args.flags,
num_outputs, args.bcanalyzer)
num_outputs += 1
# Add test case code to test
all_output = get_test_case_code(test_case_path,
flags) + '\n' + all_output
# Write to test case file in /test.
test_out_path = os.path.join(
tests_path, args.prefix + '-' + os.path.basename(test_case_path))
with open(test_out_path, 'w+') as o:
o.write(all_output)
# Clean up
shutil.rmtree(out_dir)
os.remove(test_file)
if __name__ == '__main__':
main()

View File

@ -1,10 +1,11 @@
// THIS IS A GENERATED TEST. DO NOT EDIT.
// To regenerate, see clang-doc/gen_test.py docstring.
//
// RUN: rm -rf %t
// RUN: mkdir %t
// RUN: echo "" > %t/compile_flags.txt
// RUN: cp "%s" "%t/test.cpp"
// RUN: clang-doc --dump-intermediate -doxygen -p %t %t/test.cpp -output=%t/docs
// RUN: llvm-bcanalyzer %t/docs/bc/7574630614A535710E5A6ABCFFF98BCA2D06A4CA.bc --dump | FileCheck %s
/// \brief Brief description.
///
/// Extended description that
@ -26,172 +27,176 @@ void F(int I, int J);
/// Bonus comment on definition
void F(int I, int J) {}
// CHECK: <BLOCKINFO_BLOCK/>
// CHECK-NEXT: <VersionBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-NEXT: </VersionBlock>
// CHECK-NEXT: <FunctionBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <USR abbrevid=4 op0=20 op1=117 op2=116 op3=99 op4=6 op5=20 op6=165 op7=53 op8=113 op9=14 op10=90 op11=106 op12=188 op13=255 op14=249 op15=139 op16=202 op17=45 op18=6 op19=164 op20=202/>
// CHECK-NEXT: <Name abbrevid=5 op0=1/> blob data = 'F'
// CHECK-NEXT: <CommentBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'FullComment'
// CHECK-NEXT: <CommentBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=16/> blob data = 'ParagraphComment'
// CHECK-NEXT: <CommentBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <CommentBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=19/> blob data = 'BlockCommandComment'
// CHECK-NEXT: <Name abbrevid=6 op0=5/> blob data = 'brief'
// CHECK-NEXT: <CommentBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=16/> blob data = 'ParagraphComment'
// CHECK-NEXT: <CommentBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-NEXT: <Text abbrevid=5 op0=19/> blob data = ' Brief description.'
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <CommentBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=16/> blob data = 'ParagraphComment'
// CHECK-NEXT: <CommentBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-NEXT: <Text abbrevid=5 op0=26/> blob data = ' Extended description that'
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <CommentBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-NEXT: <Text abbrevid=5 op0=30/> blob data = ' continues onto the next line.'
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <CommentBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=16/> blob data = 'ParagraphComment'
// CHECK-NEXT: <CommentBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <CommentBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=19/> blob data = 'HTMLStartTagComment'
// CHECK-NEXT: <Name abbrevid=6 op0=2/> blob data = 'ul'
// CHECK-NEXT: <AttrKey abbrevid=12 op0=5/> blob data = 'class'
// CHECK-NEXT: <AttrVal abbrevid=13 op0=4/> blob data = 'test'
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <CommentBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <CommentBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=19/> blob data = 'HTMLStartTagComment'
// CHECK-NEXT: <Name abbrevid=6 op0=2/> blob data = 'li'
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <CommentBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-NEXT: <Text abbrevid=5 op0=9/> blob data = ' Testing.'
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <CommentBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <CommentBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=17/> blob data = 'HTMLEndTagComment'
// CHECK-NEXT: <Name abbrevid=6 op0=2/> blob data = 'ul'
// CHECK-NEXT: <SelfClosing abbrevid=10 op0=1/>
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <CommentBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=16/> blob data = 'ParagraphComment'
// CHECK-NEXT: <CommentBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <CommentBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=20/> blob data = 'VerbatimBlockComment'
// CHECK-NEXT: <Name abbrevid=6 op0=8/> blob data = 'verbatim'
// CHECK-NEXT: <CloseName abbrevid=9 op0=11/> blob data = 'endverbatim'
// CHECK-NEXT: <CommentBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=24/> blob data = 'VerbatimBlockLineComment'
// CHECK-NEXT: <Text abbrevid=5 op0=27/> blob data = ' The description continues.'
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <CommentBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=16/> blob data = 'ParagraphComment'
// CHECK-NEXT: <CommentBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-NEXT: <Text abbrevid=5 op0=3/> blob data = ' --'
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <CommentBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <CommentBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=19/> blob data = 'ParamCommandComment'
// CHECK-NEXT: <Direction abbrevid=7 op0=5/> blob data = '[out]'
// CHECK-NEXT: <ParamName abbrevid=8 op0=1/> blob data = 'I'
// CHECK-NEXT: <Explicit abbrevid=11 op0=1/>
// CHECK-NEXT: <CommentBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=16/> blob data = 'ParagraphComment'
// CHECK-NEXT: <CommentBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-NEXT: <Text abbrevid=5 op0=16/> blob data = ' is a parameter.'
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <CommentBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <CommentBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=19/> blob data = 'ParamCommandComment'
// CHECK-NEXT: <Direction abbrevid=7 op0=4/> blob data = '[in]'
// CHECK-NEXT: <ParamName abbrevid=8 op0=1/> blob data = 'J'
// CHECK-NEXT: <CommentBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=16/> blob data = 'ParagraphComment'
// CHECK-NEXT: <CommentBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-NEXT: <Text abbrevid=5 op0=16/> blob data = ' is a parameter.'
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <CommentBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <CommentBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=19/> blob data = 'BlockCommandComment'
// CHECK-NEXT: <Name abbrevid=6 op0=6/> blob data = 'return'
// CHECK-NEXT: <CommentBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=16/> blob data = 'ParagraphComment'
// CHECK-NEXT: <CommentBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-NEXT: <Text abbrevid=5 op0=5/> blob data = ' void'
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <CommentBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'FullComment'
// CHECK-NEXT: <CommentBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=16/> blob data = 'ParagraphComment'
// CHECK-NEXT: <CommentBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-NEXT: <Text abbrevid=5 op0=28/> blob data = ' Bonus comment on definition'
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <DefLocation abbrevid=6 op0=27 op1={{[0-9]*}}/> blob data = '{{.*}}'
// CHECK-NEXT: <Location abbrevid=7 op0=24 op1={{[0-9]*}}/> blob data = '{{.*}}'
// CHECK-NEXT: <TypeBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Name abbrevid=5 op0=4/> blob data = 'void'
// CHECK-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-NEXT: </ReferenceBlock>
// CHECK-NEXT: </TypeBlock>
// CHECK-NEXT: <FieldTypeBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Name abbrevid=5 op0=3/> blob data = 'int'
// CHECK-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-NEXT: </ReferenceBlock>
// CHECK-NEXT: <Name abbrevid=4 op0=1/> blob data = 'I'
// CHECK-NEXT: </FieldTypeBlock>
// CHECK-NEXT: <FieldTypeBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Name abbrevid=5 op0=3/> blob data = 'int'
// CHECK-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-NEXT: </ReferenceBlock>
// CHECK-NEXT: <Name abbrevid=4 op0=1/> blob data = 'J'
// CHECK-NEXT: </FieldTypeBlock>
// CHECK-NEXT: </FunctionBlock>
// RUN: clang-doc --dump-intermediate --doxygen -p %t %t/test.cpp -output=%t/docs
// RUN: llvm-bcanalyzer --dump %t/docs/bc/7574630614A535710E5A6ABCFFF98BCA2D06A4CA.bc | FileCheck %s --check-prefix CHECK-0
// CHECK-0: <BLOCKINFO_BLOCK/>
// CHECK-0-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-0-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-0-NEXT: </VersionBlock>
// CHECK-0-NEXT: <FunctionBlock NumWords=429 BlockCodeSize=4>
// CHECK-0-NEXT: <USR abbrevid=4 op0=20 op1=117 op2=116 op3=99 op4=6 op5=20 op6=165 op7=53 op8=113 op9=14 op10=90 op11=106 op12=188 op13=255 op14=249 op15=139 op16=202 op17=45 op18=6 op19=164 op20=202/>
// CHECK-0-NEXT: <Name abbrevid=5 op0=1/> blob data = 'F'
// CHECK-0-NEXT: <CommentBlock NumWords=354 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'FullComment'
// CHECK-0-NEXT: <CommentBlock NumWords=13 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=16/> blob data = 'ParagraphComment'
// CHECK-0-NEXT: <CommentBlock NumWords=5 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: <CommentBlock NumWords=31 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=19/> blob data = 'BlockCommandComment'
// CHECK-0-NEXT: <Name abbrevid=6 op0=5/> blob data = 'brief'
// CHECK-0-NEXT: <CommentBlock NumWords=19 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=16/> blob data = 'ParagraphComment'
// CHECK-0-NEXT: <CommentBlock NumWords=11 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-0-NEXT: <Text abbrevid=5 op0=19/> blob data = ' Brief description.'
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: <CommentBlock NumWords=37 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=16/> blob data = 'ParagraphComment'
// CHECK-0-NEXT: <CommentBlock NumWords=13 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-0-NEXT: <Text abbrevid=5 op0=26/> blob data = ' Extended description that'
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: <CommentBlock NumWords=14 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-0-NEXT: <Text abbrevid=5 op0=30/> blob data = ' continues onto the next line.'
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: <CommentBlock NumWords=76 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=16/> blob data = 'ParagraphComment'
// CHECK-0-NEXT: <CommentBlock NumWords=5 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: <CommentBlock NumWords=14 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=19/> blob data = 'HTMLStartTagComment'
// CHECK-0-NEXT: <Name abbrevid=6 op0=2/> blob data = 'ul'
// CHECK-0-NEXT: <AttrKey abbrevid=12 op0=5/> blob data = 'class'
// CHECK-0-NEXT: <AttrVal abbrevid=13 op0=4/> blob data = '{{.*}}'
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: <CommentBlock NumWords=5 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: <CommentBlock NumWords=9 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=19/> blob data = 'HTMLStartTagComment'
// CHECK-0-NEXT: <Name abbrevid=6 op0=2/> blob data = 'li'
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: <CommentBlock NumWords=9 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-0-NEXT: <Text abbrevid=5 op0=9/> blob data = ' Testing.'
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: <CommentBlock NumWords=5 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: <CommentBlock NumWords=9 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=17/> blob data = 'HTMLEndTagComment'
// CHECK-0-NEXT: <Name abbrevid=6 op0=2/> blob data = 'ul'
// CHECK-0-NEXT: <SelfClosing abbrevid=10 op0=1/>
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: <CommentBlock NumWords=13 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=16/> blob data = 'ParagraphComment'
// CHECK-0-NEXT: <CommentBlock NumWords=5 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: <CommentBlock NumWords=32 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=20/> blob data = 'VerbatimBlockComment'
// CHECK-0-NEXT: <Name abbrevid=6 op0=8/> blob data = 'verbatim'
// CHECK-0-NEXT: <CloseName abbrevid=9 op0=11/> blob data = 'endverbatim'
// CHECK-0-NEXT: <CommentBlock NumWords=16 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=24/> blob data = 'VerbatimBlockLineComment'
// CHECK-0-NEXT: <Text abbrevid=5 op0=27/> blob data = ' The description continues.'
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: <CommentBlock NumWords=22 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=16/> blob data = 'ParagraphComment'
// CHECK-0-NEXT: <CommentBlock NumWords=7 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-0-NEXT: <Text abbrevid=5 op0=3/> blob data = ' --'
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: <CommentBlock NumWords=5 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: <CommentBlock NumWords=39 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=19/> blob data = 'ParamCommandComment'
// CHECK-0-NEXT: <Direction abbrevid=7 op0=5/> blob data = '[out]'
// CHECK-0-NEXT: <ParamName abbrevid=8 op0=1/> blob data = 'I'
// CHECK-0-NEXT: <Explicit abbrevid=11 op0=1/>
// CHECK-0-NEXT: <CommentBlock NumWords=25 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=16/> blob data = 'ParagraphComment'
// CHECK-0-NEXT: <CommentBlock NumWords=10 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-0-NEXT: <Text abbrevid=5 op0=16/> blob data = ' is a parameter.'
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: <CommentBlock NumWords=5 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: <CommentBlock NumWords=38 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=19/> blob data = 'ParamCommandComment'
// CHECK-0-NEXT: <Direction abbrevid=7 op0=4/> blob data = '[in]'
// CHECK-0-NEXT: <ParamName abbrevid=8 op0=1/> blob data = 'J'
// CHECK-0-NEXT: <CommentBlock NumWords=25 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=16/> blob data = 'ParagraphComment'
// CHECK-0-NEXT: <CommentBlock NumWords=10 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-0-NEXT: <Text abbrevid=5 op0=16/> blob data = ' is a parameter.'
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: <CommentBlock NumWords=5 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: <CommentBlock NumWords=28 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=19/> blob data = 'BlockCommandComment'
// CHECK-0-NEXT: <Name abbrevid=6 op0=6/> blob data = 'return'
// CHECK-0-NEXT: <CommentBlock NumWords=16 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=16/> blob data = 'ParagraphComment'
// CHECK-0-NEXT: <CommentBlock NumWords=8 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-0-NEXT: <Text abbrevid=5 op0=5/> blob data = ' void'
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: <CommentBlock NumWords=28 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'FullComment'
// CHECK-0-NEXT: <CommentBlock NumWords=21 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=16/> blob data = 'ParagraphComment'
// CHECK-0-NEXT: <CommentBlock NumWords=13 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-0-NEXT: <Text abbrevid=5 op0=28/> blob data = ' Bonus comment on definition'
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: <DefLocation abbrevid=6 op0=28 op1=4/> blob data = '{{.*}}'
// CHECK-0-NEXT: <Location abbrevid=7 op0=25 op1=4/> blob data = '{{.*}}'
// CHECK-0-NEXT: <TypeBlock NumWords=6 BlockCodeSize=4>
// CHECK-0-NEXT: <ReferenceBlock NumWords=3 BlockCodeSize=4>
// CHECK-0-NEXT: <Name abbrevid=5 op0=4/> blob data = 'void'
// CHECK-0-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-0-NEXT: </ReferenceBlock>
// CHECK-0-NEXT: </TypeBlock>
// CHECK-0-NEXT: <FieldTypeBlock NumWords=8 BlockCodeSize=4>
// CHECK-0-NEXT: <ReferenceBlock NumWords=3 BlockCodeSize=4>
// CHECK-0-NEXT: <Name abbrevid=5 op0=3/> blob data = 'int'
// CHECK-0-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-0-NEXT: </ReferenceBlock>
// CHECK-0-NEXT: <Name abbrevid=4 op0=1/> blob data = 'I'
// CHECK-0-NEXT: </FieldTypeBlock>
// CHECK-0-NEXT: <FieldTypeBlock NumWords=8 BlockCodeSize=4>
// CHECK-0-NEXT: <ReferenceBlock NumWords=3 BlockCodeSize=4>
// CHECK-0-NEXT: <Name abbrevid=5 op0=3/> blob data = 'int'
// CHECK-0-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-0-NEXT: </ReferenceBlock>
// CHECK-0-NEXT: <Name abbrevid=4 op0=1/> blob data = 'J'
// CHECK-0-NEXT: </FieldTypeBlock>
// CHECK-0-NEXT: </FunctionBlock>

View File

@ -1,19 +1,12 @@
// THIS IS A GENERATED TEST. DO NOT EDIT.
// To regenerate, see clang-doc/gen_test.py docstring.
//
// RUN: rm -rf %t
// RUN: mkdir %t
// RUN: echo "" > %t/compile_flags.txt
// RUN: cp "%s" "%t/test.cpp"
// RUN: clang-doc --dump-intermediate -doxygen -p %t %t/test.cpp -output=%t/docs
// RUN: llvm-bcanalyzer %t/docs/bc/8D042EFFC98B373450BC6B5B90A330C25A150E9C.bc --dump | FileCheck %s --check-prefix CHECK-A
// RUN: llvm-bcanalyzer %t/docs/bc/E21AF79E2A9D02554BA090D10DF39FE273F5CDB5.bc --dump | FileCheck %s --check-prefix CHECK-B
// RUN: llvm-bcanalyzer %t/docs/bc/39D3C95A5F7CE2BA4937BD7B01BAE09EBC2AD8AC.bc --dump | FileCheck %s --check-prefix CHECK-F
// RUN: llvm-bcanalyzer %t/docs/bc/9A82CB33ED0FDF81EE383D31CD0957D153C5E840.bc --dump | FileCheck %s --check-prefix CHECK-FUNC
// RUN: llvm-bcanalyzer %t/docs/bc/E9ABF7E7E2425B626723D41E76E4BC7E7A5BD775.bc --dump | FileCheck %s --check-prefix CHECK-E
namespace A {
// CHECK-A: <NamespaceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-A-NEXT: <USR abbrevid=4 op0=20 op1=141 op2=4 op3=46 op4=255 op5=201 op6=139 op7=55 op8=52 op9=80 op10=188 op11=107 op12=91 op13=144 op14=163 op15=48 op16=194 op17=90 op18=21 op19=14 op20=156/>
// CHECK-A-NEXT: <Name abbrevid=5 op0=1/> blob data = 'A'
// CHECK-A-NEXT: </NamespaceBlock>
void f();
@ -22,88 +15,125 @@ void f();
namespace A {
void f(){};
// CHECK-F: <FunctionBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-F-NEXT: <USR abbrevid=4 op0=20 op1=57 op2=211 op3=201 op4=90 op5=95 op6=124 op7=226 op8=186 op9=73 op10=55 op11=189 op12=123 op13=1 op14=186 op15=224 op16=158 op17=188 op18=42 op19=216 op20=172/>
// CHECK-F-NEXT: <Name abbrevid=5 op0=1/> blob data = 'f'
// CHECK-F-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-F-NEXT: <USR abbrevid=4 op0=20 op1=141 op2=4 op3=46 op4=255 op5=201 op6=139 op7=55 op8=52 op9=80 op10=188 op11=107 op12=91 op13=144 op14=163 op15=48 op16=194 op17=90 op18=21 op19=14 op20=156/>
// CHECK-F-NEXT: <Name abbrevid=5 op0=1/> blob data = 'A'
// CHECK-F-NEXT: <RefType abbrevid=6 op0=1/>
// CHECK-F-NEXT: <Field abbrevid=7 op0=1/>
// CHECK-F-NEXT: </ReferenceBlock>
// CHECK-F-NEXT: <DefLocation abbrevid=6 op0=24 op1={{[0-9]*}}/> blob data = '{{.*}}'
// CHECK-F-NEXT: <Location abbrevid=7 op0=18 op1={{[0-9]*}}/> blob data = '{{.*}}'
// CHECK-F-NEXT: <TypeBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-F-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-F-NEXT: <Name abbrevid=5 op0=4/> blob data = 'void'
// CHECK-F-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-F-NEXT: </ReferenceBlock>
// CHECK-F-NEXT: </TypeBlock>
// CHECK-F-NEXT: </FunctionBlock>
namespace B {
// CHECK-B: <NamespaceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-B-NEXT: <USR abbrevid=4 op0=20 op1=226 op2=26 op3=247 op4=158 op5=42 op6=157 op7=2 op8=85 op9=75 op10=160 op11=144 op12=209 op13=13 op14=243 op15=159 op16=226 op17=115 op18=245 op19=205 op20=181/>
// CHECK-B-NEXT: <Name abbrevid=5 op0=1/> blob data = 'B'
// CHECK-B-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-B-NEXT: <USR abbrevid=4 op0=20 op1=141 op2=4 op3=46 op4=255 op5=201 op6=139 op7=55 op8=52 op9=80 op10=188 op11=107 op12=91 op13=144 op14=163 op15=48 op16=194 op17=90 op18=21 op19=14 op20=156/>
// CHECK-B-NEXT: <Name abbrevid=5 op0=1/> blob data = 'A'
// CHECK-B-NEXT: <RefType abbrevid=6 op0=1/>
// CHECK-B-NEXT: <Field abbrevid=7 op0=1/>
// CHECK-B-NEXT: </ReferenceBlock>
// CHECK-B-NEXT: </NamespaceBlock>
enum E { X };
// CHECK-E: <EnumBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-E-NEXT: <USR abbrevid=4 op0=20 op1=233 op2=171 op3=247 op4=231 op5=226 op6=66 op7=91 op8=98 op9=103 op10=35 op11=212 op12=30 op13=118 op14=228 op15=188 op16=126 op17=122 op18=91 op19=215 op20=117/>
// CHECK-E-NEXT: <Name abbrevid=5 op0=1/> blob data = 'E'
// CHECK-E-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-E-NEXT: <USR abbrevid=4 op0=20 op1=226 op2=26 op3=247 op4=158 op5=42 op6=157 op7=2 op8=85 op9=75 op10=160 op11=144 op12=209 op13=13 op14=243 op15=159 op16=226 op17=115 op18=245 op19=205 op20=181/>
// CHECK-E-NEXT: <Name abbrevid=5 op0=1/> blob data = 'B'
// CHECK-E-NEXT: <RefType abbrevid=6 op0=1/>
// CHECK-E-NEXT: <Field abbrevid=7 op0=1/>
// CHECK-E-NEXT: </ReferenceBlock>
// CHECK-E-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-E-NEXT: <USR abbrevid=4 op0=20 op1=141 op2=4 op3=46 op4=255 op5=201 op6=139 op7=55 op8=52 op9=80 op10=188 op11=107 op12=91 op13=144 op14=163 op15=48 op16=194 op17=90 op18=21 op19=14 op20=156/>
// CHECK-E-NEXT: <Name abbrevid=5 op0=1/> blob data = 'A'
// CHECK-E-NEXT: <RefType abbrevid=6 op0=1/>
// CHECK-E-NEXT: <Field abbrevid=7 op0=1/>
// CHECK-E-NEXT: </ReferenceBlock>
// CHECK-E-NEXT: <DefLocation abbrevid=6 op0=56 op1={{[0-9]*}}/> blob data = '{{.*}}'
// CHECK-E-NEXT: <Member abbrevid=8 op0=1/> blob data = 'X'
// CHECK-E-NEXT: </EnumBlock>
E func(int i) { return X; }
// CHECK-FUNC: <FunctionBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-FUNC-NEXT: <USR abbrevid=4 op0=20 op1=154 op2=130 op3=203 op4=51 op5=237 op6=15 op7=223 op8=129 op9=238 op10=56 op11=61 op12=49 op13=205 op14=9 op15=87 op16=209 op17=83 op18=197 op19=232 op20=64/>
// CHECK-FUNC-NEXT: <Name abbrevid=5 op0=4/> blob data = 'func'
// CHECK-FUNC-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-FUNC-NEXT: <USR abbrevid=4 op0=20 op1=226 op2=26 op3=247 op4=158 op5=42 op6=157 op7=2 op8=85 op9=75 op10=160 op11=144 op12=209 op13=13 op14=243 op15=159 op16=226 op17=115 op18=245 op19=205 op20=181/>
// CHECK-FUNC-NEXT: <Name abbrevid=5 op0=1/> blob data = 'B'
// CHECK-FUNC-NEXT: <RefType abbrevid=6 op0=1/>
// CHECK-FUNC-NEXT: <Field abbrevid=7 op0=1/>
// CHECK-FUNC-NEXT: </ReferenceBlock>
// CHECK-FUNC-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-FUNC-NEXT: <USR abbrevid=4 op0=20 op1=141 op2=4 op3=46 op4=255 op5=201 op6=139 op7=55 op8=52 op9=80 op10=188 op11=107 op12=91 op13=144 op14=163 op15=48 op16=194 op17=90 op18=21 op19=14 op20=156/>
// CHECK-FUNC-NEXT: <Name abbrevid=5 op0=1/> blob data = 'A'
// CHECK-FUNC-NEXT: <RefType abbrevid=6 op0=1/>
// CHECK-FUNC-NEXT: <Field abbrevid=7 op0=1/>
// CHECK-FUNC-NEXT: </ReferenceBlock>
// CHECK-FUNC-NEXT: <DefLocation abbrevid=6 op0=76 op1={{[0-9]*}}/> blob data = '{{.*}}'
// CHECK-FUNC-NEXT: <TypeBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-FUNC-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-FUNC-NEXT: <Name abbrevid=5 op0=12/> blob data = 'enum A::B::E'
// CHECK-FUNC-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-FUNC-NEXT: </ReferenceBlock>
// CHECK-FUNC-NEXT: </TypeBlock>
// CHECK-FUNC-NEXT: <FieldTypeBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-FUNC-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-FUNC-NEXT: <Name abbrevid=5 op0=3/> blob data = 'int'
// CHECK-FUNC-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-FUNC-NEXT: </ReferenceBlock>
// CHECK-FUNC-NEXT: <Name abbrevid=4 op0=1/> blob data = 'i'
// CHECK-FUNC-NEXT: </FieldTypeBlock>
// CHECK-FUNC-NEXT: </FunctionBlock>
} // namespace B
} // namespace A
// RUN: clang-doc --dump-intermediate --doxygen -p %t %t/test.cpp -output=%t/docs
// RUN: llvm-bcanalyzer --dump %t/docs/bc/E9ABF7E7E2425B626723D41E76E4BC7E7A5BD775.bc | FileCheck %s --check-prefix CHECK-0
// CHECK-0: <BLOCKINFO_BLOCK/>
// CHECK-0-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-0-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-0-NEXT: </VersionBlock>
// CHECK-0-NEXT: <EnumBlock NumWords=38 BlockCodeSize=4>
// CHECK-0-NEXT: <USR abbrevid=4 op0=20 op1=233 op2=171 op3=247 op4=231 op5=226 op6=66 op7=91 op8=98 op9=103 op10=35 op11=212 op12=30 op13=118 op14=228 op15=188 op16=126 op17=122 op18=91 op19=215 op20=117/>
// CHECK-0-NEXT: <Name abbrevid=5 op0=1/> blob data = 'E'
// CHECK-0-NEXT: <ReferenceBlock NumWords=10 BlockCodeSize=4>
// CHECK-0-NEXT: <USR abbrevid=4 op0=20 op1=226 op2=26 op3=247 op4=158 op5=42 op6=157 op7=2 op8=85 op9=75 op10=160 op11=144 op12=209 op13=13 op14=243 op15=159 op16=226 op17=115 op18=245 op19=205 op20=181/>
// CHECK-0-NEXT: <Name abbrevid=5 op0=1/> blob data = 'B'
// CHECK-0-NEXT: <RefType abbrevid=6 op0=1/>
// CHECK-0-NEXT: <Field abbrevid=7 op0=1/>
// CHECK-0-NEXT: </ReferenceBlock>
// CHECK-0-NEXT: <ReferenceBlock NumWords=10 BlockCodeSize=4>
// CHECK-0-NEXT: <USR abbrevid=4 op0=20 op1=141 op2=4 op3=46 op4=255 op5=201 op6=139 op7=55 op8=52 op9=80 op10=188 op11=107 op12=91 op13=144 op14=163 op15=48 op16=194 op17=90 op18=21 op19=14 op20=156/>
// CHECK-0-NEXT: <Name abbrevid=5 op0=1/> blob data = 'A'
// CHECK-0-NEXT: <RefType abbrevid=6 op0=1/>
// CHECK-0-NEXT: <Field abbrevid=7 op0=1/>
// CHECK-0-NEXT: </ReferenceBlock>
// CHECK-0-NEXT: <DefLocation abbrevid=6 op0=21 op1=4/> blob data = '{{.*}}'
// CHECK-0-NEXT: <Member abbrevid=8 op0=1/> blob data = 'X'
// CHECK-0-NEXT: </EnumBlock>
// RUN: llvm-bcanalyzer --dump %t/docs/bc/39D3C95A5F7CE2BA4937BD7B01BAE09EBC2AD8AC.bc | FileCheck %s --check-prefix CHECK-1
// CHECK-1: <BLOCKINFO_BLOCK/>
// CHECK-1-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-1-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-1-NEXT: </VersionBlock>
// CHECK-1-NEXT: <FunctionBlock NumWords=35 BlockCodeSize=4>
// CHECK-1-NEXT: <USR abbrevid=4 op0=20 op1=57 op2=211 op3=201 op4=90 op5=95 op6=124 op7=226 op8=186 op9=73 op10=55 op11=189 op12=123 op13=1 op14=186 op15=224 op16=158 op17=188 op18=42 op19=216 op20=172/>
// CHECK-1-NEXT: <Name abbrevid=5 op0=1/> blob data = 'f'
// CHECK-1-NEXT: <ReferenceBlock NumWords=10 BlockCodeSize=4>
// CHECK-1-NEXT: <USR abbrevid=4 op0=20 op1=141 op2=4 op3=46 op4=255 op5=201 op6=139 op7=55 op8=52 op9=80 op10=188 op11=107 op12=91 op13=144 op14=163 op15=48 op16=194 op17=90 op18=21 op19=14 op20=156/>
// CHECK-1-NEXT: <Name abbrevid=5 op0=1/> blob data = 'A'
// CHECK-1-NEXT: <RefType abbrevid=6 op0=1/>
// CHECK-1-NEXT: <Field abbrevid=7 op0=1/>
// CHECK-1-NEXT: </ReferenceBlock>
// CHECK-1-NEXT: <DefLocation abbrevid=6 op0=17 op1=4/> blob data = '{{.*}}'
// CHECK-1-NEXT: <Location abbrevid=7 op0=11 op1=4/> blob data = '{{.*}}'
// CHECK-1-NEXT: <TypeBlock NumWords=6 BlockCodeSize=4>
// CHECK-1-NEXT: <ReferenceBlock NumWords=3 BlockCodeSize=4>
// CHECK-1-NEXT: <Name abbrevid=5 op0=4/> blob data = 'void'
// CHECK-1-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-1-NEXT: </ReferenceBlock>
// CHECK-1-NEXT: </TypeBlock>
// CHECK-1-NEXT: </FunctionBlock>
// RUN: llvm-bcanalyzer --dump %t/docs/bc/9A82CB33ED0FDF81EE383D31CD0957D153C5E840.bc | FileCheck %s --check-prefix CHECK-2
// CHECK-2: <BLOCKINFO_BLOCK/>
// CHECK-2-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-2-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-2-NEXT: </VersionBlock>
// CHECK-2-NEXT: <FunctionBlock NumWords=56 BlockCodeSize=4>
// CHECK-2-NEXT: <USR abbrevid=4 op0=20 op1=154 op2=130 op3=203 op4=51 op5=237 op6=15 op7=223 op8=129 op9=238 op10=56 op11=61 op12=49 op13=205 op14=9 op15=87 op16=209 op17=83 op18=197 op19=232 op20=64/>
// CHECK-2-NEXT: <Name abbrevid=5 op0=4/> blob data = 'func'
// CHECK-2-NEXT: <ReferenceBlock NumWords=10 BlockCodeSize=4>
// CHECK-2-NEXT: <USR abbrevid=4 op0=20 op1=226 op2=26 op3=247 op4=158 op5=42 op6=157 op7=2 op8=85 op9=75 op10=160 op11=144 op12=209 op13=13 op14=243 op15=159 op16=226 op17=115 op18=245 op19=205 op20=181/>
// CHECK-2-NEXT: <Name abbrevid=5 op0=1/> blob data = 'B'
// CHECK-2-NEXT: <RefType abbrevid=6 op0=1/>
// CHECK-2-NEXT: <Field abbrevid=7 op0=1/>
// CHECK-2-NEXT: </ReferenceBlock>
// CHECK-2-NEXT: <ReferenceBlock NumWords=10 BlockCodeSize=4>
// CHECK-2-NEXT: <USR abbrevid=4 op0=20 op1=141 op2=4 op3=46 op4=255 op5=201 op6=139 op7=55 op8=52 op9=80 op10=188 op11=107 op12=91 op13=144 op14=163 op15=48 op16=194 op17=90 op18=21 op19=14 op20=156/>
// CHECK-2-NEXT: <Name abbrevid=5 op0=1/> blob data = 'A'
// CHECK-2-NEXT: <RefType abbrevid=6 op0=1/>
// CHECK-2-NEXT: <Field abbrevid=7 op0=1/>
// CHECK-2-NEXT: </ReferenceBlock>
// CHECK-2-NEXT: <DefLocation abbrevid=6 op0=23 op1=4/> blob data = '{{.*}}'
// CHECK-2-NEXT: <TypeBlock NumWords=8 BlockCodeSize=4>
// CHECK-2-NEXT: <ReferenceBlock NumWords=5 BlockCodeSize=4>
// CHECK-2-NEXT: <Name abbrevid=5 op0=12/> blob data = 'enum A::B::E'
// CHECK-2-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-2-NEXT: </ReferenceBlock>
// CHECK-2-NEXT: </TypeBlock>
// CHECK-2-NEXT: <FieldTypeBlock NumWords=8 BlockCodeSize=4>
// CHECK-2-NEXT: <ReferenceBlock NumWords=3 BlockCodeSize=4>
// CHECK-2-NEXT: <Name abbrevid=5 op0=3/> blob data = 'int'
// CHECK-2-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-2-NEXT: </ReferenceBlock>
// CHECK-2-NEXT: <Name abbrevid=4 op0=1/> blob data = 'i'
// CHECK-2-NEXT: </FieldTypeBlock>
// CHECK-2-NEXT: </FunctionBlock>
// RUN: llvm-bcanalyzer --dump %t/docs/bc/8D042EFFC98B373450BC6B5B90A330C25A150E9C.bc | FileCheck %s --check-prefix CHECK-3
// CHECK-3: <BLOCKINFO_BLOCK/>
// CHECK-3-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-3-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-3-NEXT: </VersionBlock>
// CHECK-3-NEXT: <NamespaceBlock NumWords=9 BlockCodeSize=4>
// CHECK-3-NEXT: <USR abbrevid=4 op0=20 op1=141 op2=4 op3=46 op4=255 op5=201 op6=139 op7=55 op8=52 op9=80 op10=188 op11=107 op12=91 op13=144 op14=163 op15=48 op16=194 op17=90 op18=21 op19=14 op20=156/>
// CHECK-3-NEXT: <Name abbrevid=5 op0=1/> blob data = 'A'
// CHECK-3-NEXT: </NamespaceBlock>
// RUN: llvm-bcanalyzer --dump %t/docs/bc/E21AF79E2A9D02554BA090D10DF39FE273F5CDB5.bc | FileCheck %s --check-prefix CHECK-4
// CHECK-4: <BLOCKINFO_BLOCK/>
// CHECK-4-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-4-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-4-NEXT: </VersionBlock>
// CHECK-4-NEXT: <NamespaceBlock NumWords=21 BlockCodeSize=4>
// CHECK-4-NEXT: <USR abbrevid=4 op0=20 op1=226 op2=26 op3=247 op4=158 op5=42 op6=157 op7=2 op8=85 op9=75 op10=160 op11=144 op12=209 op13=13 op14=243 op15=159 op16=226 op17=115 op18=245 op19=205 op20=181/>
// CHECK-4-NEXT: <Name abbrevid=5 op0=1/> blob data = 'B'
// CHECK-4-NEXT: <ReferenceBlock NumWords=10 BlockCodeSize=4>
// CHECK-4-NEXT: <USR abbrevid=4 op0=20 op1=141 op2=4 op3=46 op4=255 op5=201 op6=139 op7=55 op8=52 op9=80 op10=188 op11=107 op12=91 op13=144 op14=163 op15=48 op16=194 op17=90 op18=21 op19=14 op20=156/>
// CHECK-4-NEXT: <Name abbrevid=5 op0=1/> blob data = 'A'
// CHECK-4-NEXT: <RefType abbrevid=6 op0=1/>
// CHECK-4-NEXT: <Field abbrevid=7 op0=1/>
// CHECK-4-NEXT: </ReferenceBlock>
// CHECK-4-NEXT: </NamespaceBlock>

View File

@ -1,120 +1,26 @@
// This test requires Linux due to the system-dependent USR for the
// inner class in function H.
// THIS IS A GENERATED TEST. DO NOT EDIT.
// To regenerate, see clang-doc/gen_test.py docstring.
//
// This test requires Linux due to system-dependent USR for the inner class.
// REQUIRES: system-linux
// RUN: rm -rf %t
// RUN: mkdir %t
// RUN: echo "" > %t/compile_flags.txt
// RUN: cp "%s" "%t/test.cpp"
// RUN: clang-doc --dump-intermediate -doxygen -p %t %t/test.cpp -output=%t/docs
// RUN: llvm-bcanalyzer %t/docs/bc/ACE81AFA6627B4CEF2B456FB6E1252925674AF7E.bc --dump | FileCheck %s --check-prefix CHECK-A
// RUN: llvm-bcanalyzer %t/docs/bc/FC07BD34D5E77782C263FA944447929EA8753740.bc --dump | FileCheck %s --check-prefix CHECK-B
// RUN: llvm-bcanalyzer %t/docs/bc/1E3438A08BA22025C0B46289FF0686F92C8924C5.bc --dump | FileCheck %s --check-prefix CHECK-BC
// RUN: llvm-bcanalyzer %t/docs/bc/06B5F6A19BA9F6A832E127C9968282B94619B210.bc --dump | FileCheck %s --check-prefix CHECK-C
// RUN: llvm-bcanalyzer %t/docs/bc/0921737541208B8FA9BB42B60F78AC1D779AA054.bc --dump | FileCheck %s --check-prefix CHECK-D
// RUN: llvm-bcanalyzer %t/docs/bc/289584A8E0FF4178A794622A547AA622503967A1.bc --dump | FileCheck %s --check-prefix CHECK-E
// RUN: llvm-bcanalyzer %t/docs/bc/DEB4AC1CD9253CD9EF7FBE6BCAC506D77984ABD4.bc --dump | FileCheck %s --check-prefix CHECK-ECON
// RUN: llvm-bcanalyzer %t/docs/bc/BD2BDEBD423F80BACCEA75DE6D6622D355FC2D17.bc --dump | FileCheck %s --check-prefix CHECK-EDES
// RUN: llvm-bcanalyzer %t/docs/bc/E3B54702FABFF4037025BA194FC27C47006330B5.bc --dump | FileCheck %s --check-prefix CHECK-F
// RUN: llvm-bcanalyzer %t/docs/bc/B6AC4C5C9F2EA3F2B3ECE1A33D349F4EE502B24E.bc --dump | FileCheck %s --check-prefix CHECK-H
// RUN: llvm-bcanalyzer %t/docs/bc/6BA1EE2B3DAEACF6E4306F10AF44908F4807927C.bc --dump | FileCheck %s --check-prefix CHECK-I
// RUN: llvm-bcanalyzer %t/docs/bc/5093D428CDC62096A67547BA52566E4FB9404EEE.bc --dump | FileCheck %s --check-prefix CHECK-PM
// RUN: llvm-bcanalyzer %t/docs/bc/CA7C7935730B5EACD25F080E9C83FA087CCDC75E.bc --dump | FileCheck %s --check-prefix CHECK-X
// RUN: llvm-bcanalyzer %t/docs/bc/641AB4A3D36399954ACDE29C7A8833032BF40472.bc --dump | FileCheck %s --check-prefix CHECK-Y
void H() {
class I {};
}
// CHECK-H: <FunctionBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-H-NEXT: <USR abbrevid=4 op0=20 op1=182 op2=172 op3=76 op4=92 op5=159 op6=46 op7=163 op8=242 op9=179 op10=236 op11=225 op12=163 op13=61 op14=52 op15=159 op16=78 op17=229 op18=2 op19=178 op20=78/>
// CHECK-H-NEXT: <Name abbrevid=5 op0=1/> blob data = 'H'
// CHECK-H-NEXT: <DefLocation abbrevid=6 op0=24 op1={{[0-9]*}}/> blob data = '{{.*}}'
// CHECK-H-NEXT: <TypeBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-H-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-H-NEXT: <Name abbrevid=5 op0=4/> blob data = 'void'
// CHECK-H-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-H-NEXT: </ReferenceBlock>
// CHECK-H-NEXT: </TypeBlock>
// CHECK-H-NEXT: </FunctionBlock>
// CHECK-I: <RecordBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-I-NEXT: <USR abbrevid=4 op0=20 op1=107 op2=161 op3=238 op4=43 op5=61 op6=174 op7=172 op8=246 op9=228 op10=48 op11=111 op12=16 op13=175 op14=68 op15=144 op16=143 op17=72 op18=7 op19=146 op20=124/>
// CHECK-I-NEXT: <Name abbrevid=5 op0=1/> blob data = 'I'
// CHECK-I-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-I-NEXT: <USR abbrevid=4 op0=20 op1=182 op2=172 op3=76 op4=92 op5=159 op6=46 op7=163 op8=242 op9=179 op10=236 op11=225 op12=163 op13=61 op14=52 op15=159 op16=78 op17=229 op18=2 op19=178 op20=78/>
// CHECK-I-NEXT: <Name abbrevid=5 op0=1/> blob data = 'H'
// CHECK-I-NEXT: <RefType abbrevid=6 op0=3/>
// CHECK-I-NEXT: <Field abbrevid=7 op0=1/>
// CHECK-I-NEXT: </ReferenceBlock>
// CHECK-I-NEXT: <DefLocation abbrevid=6 op0=25 op1={{[0-9]*}}/> blob data = '{{.*}}'
// CHECK-I-NEXT: <TagType abbrevid=8 op0=3/>
// CHECK-I-NEXT: </RecordBlock>
union A { int X; int Y; };
// CHECK-A: <RecordBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-A-NEXT: <USR abbrevid=4 op0=20 op1=172 op2=232 op3=26 op4=250 op5=102 op6=39 op7=180 op8=206 op9=242 op10=180 op11=86 op12=251 op13=110 op14=18 op15=82 op16=146 op17=86 op18=116 op19=175 op20=126/>
// CHECK-A-NEXT: <Name abbrevid=5 op0=1/> blob data = 'A'
// CHECK-A-NEXT: <DefLocation abbrevid=6 op0=53 op1={{[0-9]*}}/> blob data = '{{.*}}'
// CHECK-A-NEXT: <TagType abbrevid=8 op0=2/>
// CHECK-A-NEXT: <MemberTypeBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-A-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-A-NEXT: <Name abbrevid=5 op0=3/> blob data = 'int'
// CHECK-A-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-A-NEXT: </ReferenceBlock>
// CHECK-A-NEXT: <Name abbrevid=4 op0=1/> blob data = 'X'
// CHECK-A-NEXT: <Access abbrevid=5 op0=3/>
// CHECK-A-NEXT: </MemberTypeBlock>
// CHECK-A-NEXT: <MemberTypeBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-A-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-A-NEXT: <Name abbrevid=5 op0=3/> blob data = 'int'
// CHECK-A-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-A-NEXT: </ReferenceBlock>
// CHECK-A-NEXT: <Name abbrevid=4 op0=1/> blob data = 'Y'
// CHECK-A-NEXT: <Access abbrevid=5 op0=3/>
// CHECK-A-NEXT: </MemberTypeBlock>
// CHECK-A-NEXT: </RecordBlock>
enum B { X, Y };
// CHECK-B: <EnumBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-B-NEXT: <USR abbrevid=4 op0=20 op1=252 op2=7 op3=189 op4=52 op5=213 op6=231 op7=119 op8=130 op9=194 op10=99 op11=250 op12=148 op13=68 op14=71 op15=146 op16=158 op17=168 op18=117 op19=55 op20=64/>
// CHECK-B-NEXT: <Name abbrevid=5 op0=1/> blob data = 'B'
// CHECK-B-NEXT: <DefLocation abbrevid=6 op0=77 op1={{[0-9]*}}/> blob data = '{{.*}}'
// CHECK-B-NEXT: <Member abbrevid=8 op0=1/> blob data = 'X'
// CHECK-B-NEXT: <Member abbrevid=8 op0=1/> blob data = 'Y'
// CHECK-B-NEXT: </EnumBlock>
enum class Bc { A, B };
// CHECK-BC: <EnumBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-BC-NEXT: <USR abbrevid=4 op0=20 op1=30 op2=52 op3=56 op4=160 op5=139 op6=162 op7=32 op8=37 op9=192 op10=180 op11=98 op12=137 op13=255 op14=6 op15=134 op16=249 op17=44 op18=137 op19=36 op20=197/>
// CHECK-BC-NEXT: <Name abbrevid=5 op0=2/> blob data = 'Bc'
// CHECK-BC-NEXT: <DefLocation abbrevid=6 op0=86 op1={{[0-9]*}}/> blob data = '{{.*}}'
// CHECK-BC-NEXT: <Scoped abbrevid=9 op0=1/>
// CHECK-BC-NEXT: <Member abbrevid=8 op0=1/> blob data = 'A'
// CHECK-BC-NEXT: <Member abbrevid=8 op0=1/> blob data = 'B'
// CHECK-BC-NEXT: </EnumBlock>
struct C { int i; };
// CHECK-C: <RecordBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-C-NEXT: <USR abbrevid=4 op0=20 op1=6 op2=181 op3=246 op4=161 op5=155 op6=169 op7=246 op8=168 op9=50 op10=225 op11=39 op12=201 op13=150 op14=130 op15=130 op16=185 op17=70 op18=25 op19=178 op20=16/>
// CHECK-C-NEXT: <Name abbrevid=5 op0=1/> blob data = 'C'
// CHECK-C-NEXT: <DefLocation abbrevid=6 op0=96 op1={{[0-9]*}}/> blob data = '{{.*}}'
// CHECK-C-NEXT: <MemberTypeBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-C-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-C-NEXT: <Name abbrevid=5 op0=3/> blob data = 'int'
// CHECK-C-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-C-NEXT: </ReferenceBlock>
// CHECK-C-NEXT: <Name abbrevid=4 op0=1/> blob data = 'i'
// CHECK-C-NEXT: <Access abbrevid=5 op0=3/>
// CHECK-C-NEXT: </MemberTypeBlock>
// CHECK-C-NEXT: </RecordBlock>
class D {};
// CHECK-D: <RecordBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-D-NEXT: <USR abbrevid=4 op0=20 op1=9 op2=33 op3=115 op4=117 op5=65 op6=32 op7=139 op8=143 op9=169 op10=187 op11=66 op12=182 op13=15 op14=120 op15=172 op16=29 op17=119 op18=154 op19=160 op20=84/>
// CHECK-D-NEXT: <Name abbrevid=5 op0=1/> blob data = 'D'
// CHECK-D-NEXT: <DefLocation abbrevid=6 op0=111 op1={{[0-9]*}}/> blob data = '{{.*}}'
// CHECK-D-NEXT: <TagType abbrevid=8 op0=3/>
// CHECK-D-NEXT: </RecordBlock>
class E {
public:
@ -124,131 +30,292 @@ public:
protected:
void ProtectedMethod();
};
// CHECK-E: <RecordBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-E-NEXT: <USR abbrevid=4 op0=20 op1=40 op2=149 op3=132 op4=168 op5=224 op6=255 op7=65 op8=120 op9=167 op10=148 op11=98 op12=42 op13=84 op14=122 op15=166 op16=34 op17=80 op18=57 op19=103 op20=161/>
// CHECK-E-NEXT: <Name abbrevid=5 op0=1/> blob data = 'E'
// CHECK-E-NEXT: <DefLocation abbrevid=6 op0=119 op1={{[0-9]*}}/> blob data = '{{.*}}'
// CHECK-E-NEXT: <TagType abbrevid=8 op0=3/>
// CHECK-E-NEXT: </RecordBlock>
// CHECK-ECON: <FunctionBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-ECON-NEXT: <USR abbrevid=4 op0=20 op1=222 op2=180 op3=172 op4=28 op5=217 op6=37 op7=60 op8=217 op9=239 op10=127 op11=190 op12=107 op13=202 op14=197 op15=6 op16=215 op17=121 op18=132 op19=171 op20=212/>
// CHECK-ECON-NEXT: <Name abbrevid=5 op0=1/> blob data = 'E'
// CHECK-ECON-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-ECON-NEXT: <USR abbrevid=4 op0=20 op1=40 op2=149 op3=132 op4=168 op5=224 op6=255 op7=65 op8=120 op9=167 op10=148 op11=98 op12=42 op13=84 op14=122 op15=166 op16=34 op17=80 op18=57 op19=103 op20=161/>
// CHECK-ECON-NEXT: <Name abbrevid=5 op0=1/> blob data = 'E'
// CHECK-ECON-NEXT: <RefType abbrevid=6 op0=2/>
// CHECK-ECON-NEXT: <Field abbrevid=7 op0=1/>
// CHECK-ECON-NEXT: </ReferenceBlock>
// CHECK-ECON-NEXT: <IsMethod abbrevid=9 op0=1/>
// CHECK-ECON-NEXT: <DefLocation abbrevid=6 op0=121 op1={{[0-9]*}}/> blob data = '{{.*}}'
// CHECK-ECON-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-ECON-NEXT: <USR abbrevid=4 op0=20 op1=40 op2=149 op3=132 op4=168 op5=224 op6=255 op7=65 op8=120 op9=167 op10=148 op11=98 op12=42 op13=84 op14=122 op15=166 op16=34 op17=80 op18=57 op19=103 op20=161/>
// CHECK-ECON-NEXT: <Name abbrevid=5 op0=1/> blob data = 'E'
// CHECK-ECON-NEXT: <RefType abbrevid=6 op0=2/>
// CHECK-ECON-NEXT: <Field abbrevid=7 op0=2/>
// CHECK-ECON-NEXT: </ReferenceBlock>
// CHECK-ECON-NEXT: <TypeBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-ECON-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-ECON-NEXT: <Name abbrevid=5 op0=4/> blob data = 'void'
// CHECK-ECON-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-ECON-NEXT: </ReferenceBlock>
// CHECK-ECON-NEXT: </TypeBlock>
// CHECK-ECON-NEXT: </FunctionBlock>
// CHECK-EDES: <FunctionBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-EDES-NEXT: <USR abbrevid=4 op0=20 op1=189 op2=43 op3=222 op4=189 op5=66 op6=63 op7=128 op8=186 op9=204 op10=234 op11=117 op12=222 op13=109 op14=102 op15=34 op16=211 op17=85 op18=252 op19=45 op20=23/>
// CHECK-EDES-NEXT: <Name abbrevid=5 op0=2/> blob data = '~E'
// CHECK-EDES-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-EDES-NEXT: <USR abbrevid=4 op0=20 op1=40 op2=149 op3=132 op4=168 op5=224 op6=255 op7=65 op8=120 op9=167 op10=148 op11=98 op12=42 op13=84 op14=122 op15=166 op16=34 op17=80 op18=57 op19=103 op20=161/>
// CHECK-EDES-NEXT: <Name abbrevid=5 op0=1/> blob data = 'E'
// CHECK-EDES-NEXT: <RefType abbrevid=6 op0=2/>
// CHECK-EDES-NEXT: <Field abbrevid=7 op0=1/>
// CHECK-EDES-NEXT: </ReferenceBlock>
// CHECK-EDES-NEXT: <IsMethod abbrevid=9 op0=1/>
// CHECK-EDES-NEXT: <DefLocation abbrevid=6 op0=122 op1={{[0-9]*}}/> blob data = '{{.*}}'
// CHECK-EDES-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-EDES-NEXT: <USR abbrevid=4 op0=20 op1=40 op2=149 op3=132 op4=168 op5=224 op6=255 op7=65 op8=120 op9=167 op10=148 op11=98 op12=42 op13=84 op14=122 op15=166 op16=34 op17=80 op18=57 op19=103 op20=161/>
// CHECK-EDES-NEXT: <Name abbrevid=5 op0=1/> blob data = 'E'
// CHECK-EDES-NEXT: <RefType abbrevid=6 op0=2/>
// CHECK-EDES-NEXT: <Field abbrevid=7 op0=2/>
// CHECK-EDES-NEXT: </ReferenceBlock>
// CHECK-EDES-NEXT: <TypeBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-EDES-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-EDES-NEXT: <Name abbrevid=5 op0=4/> blob data = 'void'
// CHECK-EDES-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-EDES-NEXT: </ReferenceBlock>
// CHECK-EDES-NEXT: </TypeBlock>
// CHECK-EDES-NEXT: </FunctionBlock>
void E::ProtectedMethod() {}
// CHECK-PM: <FunctionBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-PM-NEXT: <USR abbrevid=4 op0=20 op1=80 op2=147 op3=212 op4=40 op5=205 op6=198 op7=32 op8=150 op9=166 op10=117 op11=71 op12=186 op13=82 op14=86 op15=110 op16=79 op17=185 op18=64 op19=78 op20=238/>
// CHECK-PM-NEXT: <Name abbrevid=5 op0=15/> blob data = 'ProtectedMethod'
// CHECK-PM-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-PM-NEXT: <USR abbrevid=4 op0=20 op1=40 op2=149 op3=132 op4=168 op5=224 op6=255 op7=65 op8=120 op9=167 op10=148 op11=98 op12=42 op13=84 op14=122 op15=166 op16=34 op17=80 op18=57 op19=103 op20=161/>
// CHECK-PM-NEXT: <Name abbrevid=5 op0=1/> blob data = 'E'
// CHECK-PM-NEXT: <RefType abbrevid=6 op0=2/>
// CHECK-PM-NEXT: <Field abbrevid=7 op0=1/>
// CHECK-PM-NEXT: </ReferenceBlock>
// CHECK-PM-NEXT: <IsMethod abbrevid=9 op0=1/>
// CHECK-PM-NEXT: <DefLocation abbrevid=6 op0=184 op1={{[0-9]*}}/> blob data = '{{.*}}'
// CHECK-PM-NEXT: <Location abbrevid=7 op0=125 op1={{[0-9]*}}/> blob data = '{{.*}}'
// CHECK-PM-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-PM-NEXT: <USR abbrevid=4 op0=20 op1=40 op2=149 op3=132 op4=168 op5=224 op6=255 op7=65 op8=120 op9=167 op10=148 op11=98 op12=42 op13=84 op14=122 op15=166 op16=34 op17=80 op18=57 op19=103 op20=161/>
// CHECK-PM-NEXT: <Name abbrevid=5 op0=1/> blob data = 'E'
// CHECK-PM-NEXT: <RefType abbrevid=6 op0=2/>
// CHECK-PM-NEXT: <Field abbrevid=7 op0=2/>
// CHECK-PM-NEXT: </ReferenceBlock>
// CHECK-PM-NEXT: <TypeBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-PM-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-PM-NEXT: <Name abbrevid=5 op0=4/> blob data = 'void'
// CHECK-PM-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-PM-NEXT: </ReferenceBlock>
// CHECK-PM-NEXT: </TypeBlock>
// CHECK-PM-NEXT: </FunctionBlock>
class F : virtual private D, public E {};
// CHECK-F: <RecordBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-F-NEXT: <USR abbrevid=4 op0=20 op1=227 op2=181 op3=71 op4=2 op5=250 op6=191 op7=244 op8=3 op9=112 op10=37 op11=186 op12=25 op13=79 op14=194 op15=124 op16=71 op17=0 op18=99 op19=48 op20=181/>
// CHECK-F-NEXT: <Name abbrevid=5 op0=1/> blob data = 'F'
// CHECK-F-NEXT: <DefLocation abbrevid=6 op0=213 op1={{[0-9]*}}/> blob data = '{{.*}}'
// CHECK-F-NEXT: <TagType abbrevid=8 op0=3/>
// CHECK-F-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-F-NEXT: <USR abbrevid=4 op0=20 op1=40 op2=149 op3=132 op4=168 op5=224 op6=255 op7=65 op8=120 op9=167 op10=148 op11=98 op12=42 op13=84 op14=122 op15=166 op16=34 op17=80 op18=57 op19=103 op20=161/>
// CHECK-F-NEXT: <Name abbrevid=5 op0=1/> blob data = 'E'
// CHECK-F-NEXT: <RefType abbrevid=6 op0=2/>
// CHECK-F-NEXT: <Field abbrevid=7 op0=2/>
// CHECK-F-NEXT: </ReferenceBlock>
// CHECK-F-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-F-NEXT: <USR abbrevid=4 op0=20 op1=9 op2=33 op3=115 op4=117 op5=65 op6=32 op7=139 op8=143 op9=169 op10=187 op11=66 op12=182 op13=15 op14=120 op15=172 op16=29 op17=119 op18=154 op19=160 op20=84/>
// CHECK-F-NEXT: <Name abbrevid=5 op0=1/> blob data = 'D'
// CHECK-F-NEXT: <RefType abbrevid=6 op0=2/>
// CHECK-F-NEXT: <Field abbrevid=7 op0=3/>
// CHECK-F-NEXT: </ReferenceBlock>
// CHECK-F-NEXT: </RecordBlock>
class X {
class Y {};
};
// CHECK-X: <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=6 op0=233 op1={{[0-9]*}}/> blob data = '{{.*}}'
// CHECK-X-NEXT: <TagType abbrevid=8 op0=3/>
// CHECK-X-NEXT: </RecordBlock>
// CHECK-Y: <RecordBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-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-Y-NEXT: <Name abbrevid=5 op0=1/> blob data = 'Y'
// CHECK-Y-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-Y-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-Y-NEXT: <Name abbrevid=5 op0=1/> blob data = 'X'
// CHECK-Y-NEXT: <RefType abbrevid=6 op0=2/>
// CHECK-Y-NEXT: <Field abbrevid=7 op0=1/>
// CHECK-Y-NEXT: </ReferenceBlock>
// CHECK-Y-NEXT: <DefLocation abbrevid=6 op0=234 op1={{[0-9]*}}/> blob data = '{{.*}}'
// CHECK-Y-NEXT: <TagType abbrevid=8 op0=3/>
// CHECK-Y-NEXT: </RecordBlock>
// RUN: clang-doc --dump-intermediate --doxygen -p %t %t/test.cpp -output=%t/docs
// RUN: llvm-bcanalyzer --dump %t/docs/bc/289584A8E0FF4178A794622A547AA622503967A1.bc | FileCheck %s --check-prefix CHECK-0
// CHECK-0: <BLOCKINFO_BLOCK/>
// CHECK-0-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-0-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-0-NEXT: </VersionBlock>
// CHECK-0-NEXT: <RecordBlock NumWords=12 BlockCodeSize=4>
// CHECK-0-NEXT: <USR abbrevid=4 op0=20 op1=40 op2=149 op3=132 op4=168 op5=224 op6=255 op7=65 op8=120 op9=167 op10=148 op11=98 op12=42 op13=84 op14=122 op15=166 op16=34 op17=80 op18=57 op19=103 op20=161/>
// CHECK-0-NEXT: <Name abbrevid=5 op0=1/> blob data = 'E'
// CHECK-0-NEXT: <DefLocation abbrevid=6 op0=25 op1=4/> blob data = '{{.*}}'
// CHECK-0-NEXT: <TagType abbrevid=8 op0=3/>
// CHECK-0-NEXT: </RecordBlock>
// RUN: llvm-bcanalyzer --dump %t/docs/bc/3FB542274573CAEAD54CEBFFCAEE3D77FB9713D8.bc | FileCheck %s --check-prefix CHECK-1
// CHECK-1: <BLOCKINFO_BLOCK/>
// CHECK-1-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-1-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-1-NEXT: </VersionBlock>
// CHECK-1-NEXT: <RecordBlock NumWords=24 BlockCodeSize=4>
// CHECK-1-NEXT: <USR abbrevid=4 op0=20 op1=63 op2=181 op3=66 op4=39 op5=69 op6=115 op7=202 op8=234 op9=213 op10=76 op11=235 op12=255 op13=202 op14=238 op15=61 op16=119 op17=251 op18=151 op19=19 op20=216/>
// CHECK-1-NEXT: <Name abbrevid=5 op0=1/> blob data = 'I'
// CHECK-1-NEXT: <ReferenceBlock NumWords=10 BlockCodeSize=4>
// CHECK-1-NEXT: <USR abbrevid=4 op0=20 op1=182 op2=172 op3=76 op4=92 op5=159 op6=46 op7=163 op8=242 op9=179 op10=236 op11=225 op12=163 op13=61 op14=52 op15=159 op16=78 op17=229 op18=2 op19=178 op20=78/>
// CHECK-1-NEXT: <Name abbrevid=5 op0=1/> blob data = 'H'
// CHECK-1-NEXT: <RefType abbrevid=6 op0=3/>
// CHECK-1-NEXT: <Field abbrevid=7 op0=1/>
// CHECK-1-NEXT: </ReferenceBlock>
// CHECK-1-NEXT: <DefLocation abbrevid=6 op0=12 op1=4/> blob data = '{{.*}}'
// CHECK-1-NEXT: <TagType abbrevid=8 op0=3/>
// CHECK-1-NEXT: </RecordBlock>
// RUN: llvm-bcanalyzer --dump %t/docs/bc/5093D428CDC62096A67547BA52566E4FB9404EEE.bc | FileCheck %s --check-prefix CHECK-2
// CHECK-2: <BLOCKINFO_BLOCK/>
// CHECK-2-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-2-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-2-NEXT: </VersionBlock>
// CHECK-2-NEXT: <FunctionBlock NumWords=50 BlockCodeSize=4>
// CHECK-2-NEXT: <USR abbrevid=4 op0=20 op1=80 op2=147 op3=212 op4=40 op5=205 op6=198 op7=32 op8=150 op9=166 op10=117 op11=71 op12=186 op13=82 op14=86 op15=110 op16=79 op17=185 op18=64 op19=78 op20=238/>
// CHECK-2-NEXT: <Name abbrevid=5 op0=15/> blob data = 'ProtectedMethod'
// CHECK-2-NEXT: <ReferenceBlock NumWords=10 BlockCodeSize=4>
// CHECK-2-NEXT: <USR abbrevid=4 op0=20 op1=40 op2=149 op3=132 op4=168 op5=224 op6=255 op7=65 op8=120 op9=167 op10=148 op11=98 op12=42 op13=84 op14=122 op15=166 op16=34 op17=80 op18=57 op19=103 op20=161/>
// CHECK-2-NEXT: <Name abbrevid=5 op0=1/> blob data = 'E'
// CHECK-2-NEXT: <RefType abbrevid=6 op0=2/>
// CHECK-2-NEXT: <Field abbrevid=7 op0=1/>
// CHECK-2-NEXT: </ReferenceBlock>
// CHECK-2-NEXT: <IsMethod abbrevid=9 op0=1/>
// CHECK-2-NEXT: <DefLocation abbrevid=6 op0=34 op1=4/> blob data = '{{.*}}'
// CHECK-2-NEXT: <Location abbrevid=7 op0=31 op1=4/> blob data = '{{.*}}'
// CHECK-2-NEXT: <ReferenceBlock NumWords=10 BlockCodeSize=4>
// CHECK-2-NEXT: <USR abbrevid=4 op0=20 op1=40 op2=149 op3=132 op4=168 op5=224 op6=255 op7=65 op8=120 op9=167 op10=148 op11=98 op12=42 op13=84 op14=122 op15=166 op16=34 op17=80 op18=57 op19=103 op20=161/>
// CHECK-2-NEXT: <Name abbrevid=5 op0=1/> blob data = 'E'
// CHECK-2-NEXT: <RefType abbrevid=6 op0=2/>
// CHECK-2-NEXT: <Field abbrevid=7 op0=2/>
// CHECK-2-NEXT: </ReferenceBlock>
// CHECK-2-NEXT: <TypeBlock NumWords=6 BlockCodeSize=4>
// CHECK-2-NEXT: <ReferenceBlock NumWords=3 BlockCodeSize=4>
// CHECK-2-NEXT: <Name abbrevid=5 op0=4/> blob data = 'void'
// CHECK-2-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-2-NEXT: </ReferenceBlock>
// CHECK-2-NEXT: </TypeBlock>
// CHECK-2-NEXT: </FunctionBlock>
// RUN: llvm-bcanalyzer --dump %t/docs/bc/CA7C7935730B5EACD25F080E9C83FA087CCDC75E.bc | FileCheck %s --check-prefix CHECK-3
// CHECK-3: <BLOCKINFO_BLOCK/>
// CHECK-3-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-3-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-3-NEXT: </VersionBlock>
// CHECK-3-NEXT: <RecordBlock NumWords=12 BlockCodeSize=4>
// CHECK-3-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-3-NEXT: <Name abbrevid=5 op0=1/> blob data = 'X'
// CHECK-3-NEXT: <DefLocation abbrevid=6 op0=38 op1=4/> blob data = '{{.*}}'
// CHECK-3-NEXT: <TagType abbrevid=8 op0=3/>
// CHECK-3-NEXT: </RecordBlock>
// RUN: llvm-bcanalyzer --dump %t/docs/bc/B6AC4C5C9F2EA3F2B3ECE1A33D349F4EE502B24E.bc | FileCheck %s --check-prefix CHECK-4
// CHECK-4: <BLOCKINFO_BLOCK/>
// CHECK-4-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-4-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-4-NEXT: </VersionBlock>
// CHECK-4-NEXT: <FunctionBlock NumWords=20 BlockCodeSize=4>
// CHECK-4-NEXT: <USR abbrevid=4 op0=20 op1=182 op2=172 op3=76 op4=92 op5=159 op6=46 op7=163 op8=242 op9=179 op10=236 op11=225 op12=163 op13=61 op14=52 op15=159 op16=78 op17=229 op18=2 op19=178 op20=78/>
// CHECK-4-NEXT: <Name abbrevid=5 op0=1/> blob data = 'H'
// CHECK-4-NEXT: <DefLocation abbrevid=6 op0=11 op1=4/> blob data = '{{.*}}'
// CHECK-4-NEXT: <TypeBlock NumWords=6 BlockCodeSize=4>
// CHECK-4-NEXT: <ReferenceBlock NumWords=3 BlockCodeSize=4>
// CHECK-4-NEXT: <Name abbrevid=5 op0=4/> blob data = 'void'
// CHECK-4-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-4-NEXT: </ReferenceBlock>
// CHECK-4-NEXT: </TypeBlock>
// CHECK-4-NEXT: </FunctionBlock>
// RUN: llvm-bcanalyzer --dump %t/docs/bc/06B5F6A19BA9F6A832E127C9968282B94619B210.bc | FileCheck %s --check-prefix CHECK-5
// CHECK-5: <BLOCKINFO_BLOCK/>
// CHECK-5-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-5-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-5-NEXT: </VersionBlock>
// CHECK-5-NEXT: <RecordBlock NumWords=22 BlockCodeSize=4>
// CHECK-5-NEXT: <USR abbrevid=4 op0=20 op1=6 op2=181 op3=246 op4=161 op5=155 op6=169 op7=246 op8=168 op9=50 op10=225 op11=39 op12=201 op13=150 op14=130 op15=130 op16=185 op17=70 op18=25 op19=178 op20=16/>
// CHECK-5-NEXT: <Name abbrevid=5 op0=1/> blob data = 'C'
// CHECK-5-NEXT: <DefLocation abbrevid=6 op0=21 op1=4/> blob data = '{{.*}}'
// CHECK-5-NEXT: <MemberTypeBlock NumWords=8 BlockCodeSize=4>
// CHECK-5-NEXT: <ReferenceBlock NumWords=3 BlockCodeSize=4>
// CHECK-5-NEXT: <Name abbrevid=5 op0=3/> blob data = 'int'
// CHECK-5-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-5-NEXT: </ReferenceBlock>
// CHECK-5-NEXT: <Name abbrevid=4 op0=1/> blob data = 'i'
// CHECK-5-NEXT: <Access abbrevid=5 op0=3/>
// CHECK-5-NEXT: </MemberTypeBlock>
// CHECK-5-NEXT: </RecordBlock>
// RUN: llvm-bcanalyzer --dump %t/docs/bc/BD2BDEBD423F80BACCEA75DE6D6622D355FC2D17.bc | FileCheck %s --check-prefix CHECK-6
// CHECK-6: <BLOCKINFO_BLOCK/>
// CHECK-6-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-6-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-6-NEXT: </VersionBlock>
// CHECK-6-NEXT: <FunctionBlock NumWords=44 BlockCodeSize=4>
// CHECK-6-NEXT: <USR abbrevid=4 op0=20 op1=189 op2=43 op3=222 op4=189 op5=66 op6=63 op7=128 op8=186 op9=204 op10=234 op11=117 op12=222 op13=109 op14=102 op15=34 op16=211 op17=85 op18=252 op19=45 op20=23/>
// CHECK-6-NEXT: <Name abbrevid=5 op0=2/> blob data = '~E'
// CHECK-6-NEXT: <ReferenceBlock NumWords=10 BlockCodeSize=4>
// CHECK-6-NEXT: <USR abbrevid=4 op0=20 op1=40 op2=149 op3=132 op4=168 op5=224 op6=255 op7=65 op8=120 op9=167 op10=148 op11=98 op12=42 op13=84 op14=122 op15=166 op16=34 op17=80 op18=57 op19=103 op20=161/>
// CHECK-6-NEXT: <Name abbrevid=5 op0=1/> blob data = 'E'
// CHECK-6-NEXT: <RefType abbrevid=6 op0=2/>
// CHECK-6-NEXT: <Field abbrevid=7 op0=1/>
// CHECK-6-NEXT: </ReferenceBlock>
// CHECK-6-NEXT: <IsMethod abbrevid=9 op0=1/>
// CHECK-6-NEXT: <DefLocation abbrevid=6 op0=28 op1=4/> blob data = '{{.*}}'
// CHECK-6-NEXT: <ReferenceBlock NumWords=10 BlockCodeSize=4>
// CHECK-6-NEXT: <USR abbrevid=4 op0=20 op1=40 op2=149 op3=132 op4=168 op5=224 op6=255 op7=65 op8=120 op9=167 op10=148 op11=98 op12=42 op13=84 op14=122 op15=166 op16=34 op17=80 op18=57 op19=103 op20=161/>
// CHECK-6-NEXT: <Name abbrevid=5 op0=1/> blob data = 'E'
// CHECK-6-NEXT: <RefType abbrevid=6 op0=2/>
// CHECK-6-NEXT: <Field abbrevid=7 op0=2/>
// CHECK-6-NEXT: </ReferenceBlock>
// CHECK-6-NEXT: <TypeBlock NumWords=6 BlockCodeSize=4>
// CHECK-6-NEXT: <ReferenceBlock NumWords=3 BlockCodeSize=4>
// CHECK-6-NEXT: <Name abbrevid=5 op0=4/> blob data = 'void'
// CHECK-6-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-6-NEXT: </ReferenceBlock>
// CHECK-6-NEXT: </TypeBlock>
// CHECK-6-NEXT: </FunctionBlock>
// RUN: llvm-bcanalyzer --dump %t/docs/bc/DEB4AC1CD9253CD9EF7FBE6BCAC506D77984ABD4.bc | FileCheck %s --check-prefix CHECK-7
// CHECK-7: <BLOCKINFO_BLOCK/>
// CHECK-7-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-7-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-7-NEXT: </VersionBlock>
// CHECK-7-NEXT: <FunctionBlock NumWords=44 BlockCodeSize=4>
// CHECK-7-NEXT: <USR abbrevid=4 op0=20 op1=222 op2=180 op3=172 op4=28 op5=217 op6=37 op7=60 op8=217 op9=239 op10=127 op11=190 op12=107 op13=202 op14=197 op15=6 op16=215 op17=121 op18=132 op19=171 op20=212/>
// CHECK-7-NEXT: <Name abbrevid=5 op0=1/> blob data = 'E'
// CHECK-7-NEXT: <ReferenceBlock NumWords=10 BlockCodeSize=4>
// CHECK-7-NEXT: <USR abbrevid=4 op0=20 op1=40 op2=149 op3=132 op4=168 op5=224 op6=255 op7=65 op8=120 op9=167 op10=148 op11=98 op12=42 op13=84 op14=122 op15=166 op16=34 op17=80 op18=57 op19=103 op20=161/>
// CHECK-7-NEXT: <Name abbrevid=5 op0=1/> blob data = 'E'
// CHECK-7-NEXT: <RefType abbrevid=6 op0=2/>
// CHECK-7-NEXT: <Field abbrevid=7 op0=1/>
// CHECK-7-NEXT: </ReferenceBlock>
// CHECK-7-NEXT: <IsMethod abbrevid=9 op0=1/>
// CHECK-7-NEXT: <DefLocation abbrevid=6 op0=27 op1=4/> blob data = '{{.*}}'
// CHECK-7-NEXT: <ReferenceBlock NumWords=10 BlockCodeSize=4>
// CHECK-7-NEXT: <USR abbrevid=4 op0=20 op1=40 op2=149 op3=132 op4=168 op5=224 op6=255 op7=65 op8=120 op9=167 op10=148 op11=98 op12=42 op13=84 op14=122 op15=166 op16=34 op17=80 op18=57 op19=103 op20=161/>
// CHECK-7-NEXT: <Name abbrevid=5 op0=1/> blob data = 'E'
// CHECK-7-NEXT: <RefType abbrevid=6 op0=2/>
// CHECK-7-NEXT: <Field abbrevid=7 op0=2/>
// CHECK-7-NEXT: </ReferenceBlock>
// CHECK-7-NEXT: <TypeBlock NumWords=6 BlockCodeSize=4>
// CHECK-7-NEXT: <ReferenceBlock NumWords=3 BlockCodeSize=4>
// CHECK-7-NEXT: <Name abbrevid=5 op0=4/> blob data = 'void'
// CHECK-7-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-7-NEXT: </ReferenceBlock>
// CHECK-7-NEXT: </TypeBlock>
// CHECK-7-NEXT: </FunctionBlock>
// RUN: llvm-bcanalyzer --dump %t/docs/bc/641AB4A3D36399954ACDE29C7A8833032BF40472.bc | FileCheck %s --check-prefix CHECK-8
// CHECK-8: <BLOCKINFO_BLOCK/>
// CHECK-8-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-8-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-8-NEXT: </VersionBlock>
// CHECK-8-NEXT: <RecordBlock NumWords=24 BlockCodeSize=4>
// CHECK-8-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-8-NEXT: <Name abbrevid=5 op0=1/> blob data = 'Y'
// CHECK-8-NEXT: <ReferenceBlock NumWords=10 BlockCodeSize=4>
// CHECK-8-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-8-NEXT: <Name abbrevid=5 op0=1/> blob data = 'X'
// CHECK-8-NEXT: <RefType abbrevid=6 op0=2/>
// CHECK-8-NEXT: <Field abbrevid=7 op0=1/>
// CHECK-8-NEXT: </ReferenceBlock>
// CHECK-8-NEXT: <DefLocation abbrevid=6 op0=39 op1=4/> blob data = '{{.*}}'
// CHECK-8-NEXT: <TagType abbrevid=8 op0=3/>
// CHECK-8-NEXT: </RecordBlock>
// RUN: llvm-bcanalyzer --dump %t/docs/bc/FC07BD34D5E77782C263FA944447929EA8753740.bc | FileCheck %s --check-prefix CHECK-9
// CHECK-9: <BLOCKINFO_BLOCK/>
// CHECK-9-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-9-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-9-NEXT: </VersionBlock>
// CHECK-9-NEXT: <EnumBlock NumWords=16 BlockCodeSize=4>
// CHECK-9-NEXT: <USR abbrevid=4 op0=20 op1=252 op2=7 op3=189 op4=52 op5=213 op6=231 op7=119 op8=130 op9=194 op10=99 op11=250 op12=148 op13=68 op14=71 op15=146 op16=158 op17=168 op18=117 op19=55 op20=64/>
// CHECK-9-NEXT: <Name abbrevid=5 op0=1/> blob data = 'B'
// CHECK-9-NEXT: <DefLocation abbrevid=6 op0=17 op1=4/> blob data = '{{.*}}'
// CHECK-9-NEXT: <Member abbrevid=8 op0=1/> blob data = 'X'
// CHECK-9-NEXT: <Member abbrevid=8 op0=1/> blob data = 'Y'
// CHECK-9-NEXT: </EnumBlock>
// RUN: llvm-bcanalyzer --dump %t/docs/bc/0921737541208B8FA9BB42B60F78AC1D779AA054.bc | FileCheck %s --check-prefix CHECK-10
// CHECK-10: <BLOCKINFO_BLOCK/>
// CHECK-10-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-10-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-10-NEXT: </VersionBlock>
// CHECK-10-NEXT: <RecordBlock NumWords=12 BlockCodeSize=4>
// CHECK-10-NEXT: <USR abbrevid=4 op0=20 op1=9 op2=33 op3=115 op4=117 op5=65 op6=32 op7=139 op8=143 op9=169 op10=187 op11=66 op12=182 op13=15 op14=120 op15=172 op16=29 op17=119 op18=154 op19=160 op20=84/>
// CHECK-10-NEXT: <Name abbrevid=5 op0=1/> blob data = 'D'
// CHECK-10-NEXT: <DefLocation abbrevid=6 op0=23 op1=4/> blob data = '{{.*}}'
// CHECK-10-NEXT: <TagType abbrevid=8 op0=3/>
// CHECK-10-NEXT: </RecordBlock>
// RUN: llvm-bcanalyzer --dump %t/docs/bc/E3B54702FABFF4037025BA194FC27C47006330B5.bc | FileCheck %s --check-prefix CHECK-11
// CHECK-11: <BLOCKINFO_BLOCK/>
// CHECK-11-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-11-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-11-NEXT: </VersionBlock>
// CHECK-11-NEXT: <RecordBlock NumWords=37 BlockCodeSize=4>
// CHECK-11-NEXT: <USR abbrevid=4 op0=20 op1=227 op2=181 op3=71 op4=2 op5=250 op6=191 op7=244 op8=3 op9=112 op10=37 op11=186 op12=25 op13=79 op14=194 op15=124 op16=71 op17=0 op18=99 op19=48 op20=181/>
// CHECK-11-NEXT: <Name abbrevid=5 op0=1/> blob data = 'F'
// CHECK-11-NEXT: <DefLocation abbrevid=6 op0=36 op1=4/> blob data = '{{.*}}'
// CHECK-11-NEXT: <TagType abbrevid=8 op0=3/>
// CHECK-11-NEXT: <ReferenceBlock NumWords=10 BlockCodeSize=4>
// CHECK-11-NEXT: <USR abbrevid=4 op0=20 op1=40 op2=149 op3=132 op4=168 op5=224 op6=255 op7=65 op8=120 op9=167 op10=148 op11=98 op12=42 op13=84 op14=122 op15=166 op16=34 op17=80 op18=57 op19=103 op20=161/>
// CHECK-11-NEXT: <Name abbrevid=5 op0=1/> blob data = 'E'
// CHECK-11-NEXT: <RefType abbrevid=6 op0=2/>
// CHECK-11-NEXT: <Field abbrevid=7 op0=2/>
// CHECK-11-NEXT: </ReferenceBlock>
// CHECK-11-NEXT: <ReferenceBlock NumWords=10 BlockCodeSize=4>
// CHECK-11-NEXT: <USR abbrevid=4 op0=20 op1=9 op2=33 op3=115 op4=117 op5=65 op6=32 op7=139 op8=143 op9=169 op10=187 op11=66 op12=182 op13=15 op14=120 op15=172 op16=29 op17=119 op18=154 op19=160 op20=84/>
// CHECK-11-NEXT: <Name abbrevid=5 op0=1/> blob data = 'D'
// CHECK-11-NEXT: <RefType abbrevid=6 op0=2/>
// CHECK-11-NEXT: <Field abbrevid=7 op0=3/>
// CHECK-11-NEXT: </ReferenceBlock>
// CHECK-11-NEXT: </RecordBlock>
// RUN: llvm-bcanalyzer --dump %t/docs/bc/ACE81AFA6627B4CEF2B456FB6E1252925674AF7E.bc | FileCheck %s --check-prefix CHECK-12
// CHECK-12: <BLOCKINFO_BLOCK/>
// CHECK-12-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-12-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-12-NEXT: </VersionBlock>
// CHECK-12-NEXT: <RecordBlock NumWords=33 BlockCodeSize=4>
// CHECK-12-NEXT: <USR abbrevid=4 op0=20 op1=172 op2=232 op3=26 op4=250 op5=102 op6=39 op7=180 op8=206 op9=242 op10=180 op11=86 op12=251 op13=110 op14=18 op15=82 op16=146 op17=86 op18=116 op19=175 op20=126/>
// CHECK-12-NEXT: <Name abbrevid=5 op0=1/> blob data = 'A'
// CHECK-12-NEXT: <DefLocation abbrevid=6 op0=15 op1=4/> blob data = '{{.*}}'
// CHECK-12-NEXT: <TagType abbrevid=8 op0=2/>
// CHECK-12-NEXT: <MemberTypeBlock NumWords=8 BlockCodeSize=4>
// CHECK-12-NEXT: <ReferenceBlock NumWords=3 BlockCodeSize=4>
// CHECK-12-NEXT: <Name abbrevid=5 op0=3/> blob data = 'int'
// CHECK-12-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-12-NEXT: </ReferenceBlock>
// CHECK-12-NEXT: <Name abbrevid=4 op0=1/> blob data = 'X'
// CHECK-12-NEXT: <Access abbrevid=5 op0=3/>
// CHECK-12-NEXT: </MemberTypeBlock>
// CHECK-12-NEXT: <MemberTypeBlock NumWords=8 BlockCodeSize=4>
// CHECK-12-NEXT: <ReferenceBlock NumWords=3 BlockCodeSize=4>
// CHECK-12-NEXT: <Name abbrevid=5 op0=3/> blob data = 'int'
// CHECK-12-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-12-NEXT: </ReferenceBlock>
// CHECK-12-NEXT: <Name abbrevid=4 op0=1/> blob data = 'Y'
// CHECK-12-NEXT: <Access abbrevid=5 op0=3/>
// CHECK-12-NEXT: </MemberTypeBlock>
// CHECK-12-NEXT: </RecordBlock>
// RUN: llvm-bcanalyzer --dump %t/docs/bc/1E3438A08BA22025C0B46289FF0686F92C8924C5.bc | FileCheck %s --check-prefix CHECK-13
// CHECK-13: <BLOCKINFO_BLOCK/>
// CHECK-13-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-13-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-13-NEXT: </VersionBlock>
// CHECK-13-NEXT: <EnumBlock NumWords=16 BlockCodeSize=4>
// CHECK-13-NEXT: <USR abbrevid=4 op0=20 op1=30 op2=52 op3=56 op4=160 op5=139 op6=162 op7=32 op8=37 op9=192 op10=180 op11=98 op12=137 op13=255 op14=6 op15=134 op16=249 op17=44 op18=137 op19=36 op20=197/>
// CHECK-13-NEXT: <Name abbrevid=5 op0=2/> blob data = 'Bc'
// CHECK-13-NEXT: <DefLocation abbrevid=6 op0=19 op1=4/> blob data = '{{.*}}'
// CHECK-13-NEXT: <Scoped abbrevid=9 op0=1/>
// CHECK-13-NEXT: <Member abbrevid=8 op0=1/> blob data = 'A'
// CHECK-13-NEXT: <Member abbrevid=8 op0=1/> blob data = 'B'
// CHECK-13-NEXT: </EnumBlock>

View File

@ -1,40 +0,0 @@
// 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=2/>
// 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=6 op0=9 op1={{[0-9]*}}/> blob data = '{{.*}}'
// CHECK-X-NEXT: <TagType abbrevid=8 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=2/>
// 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: <ReferenceBlock NumWords=10 BlockCodeSize=4>
// CHECK-X-Y-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-Y-NEXT: <Name abbrevid=5 op0=1/> blob data = 'X'
// CHECK-X-Y-NEXT: <RefType abbrevid=6 op0=2/>
// CHECK-X-Y-NEXT: <Field abbrevid=7 op0=1/>
// CHECK-X-Y-NEXT: </ReferenceBlock>
// CHECK-X-Y-NEXT: <DefLocation abbrevid=6 op0=10 op1={{[0-9]*}}/> blob data = '{{.*}}'
// CHECK-X-Y-NEXT: <TagType abbrevid=8 op0=3/>
// CHECK-X-Y-NEXT: </RecordBlock>

View File

@ -1,49 +0,0 @@
// This test requires Linux due to the system-dependent USR for the
// inner class.
// REQUIRES: system-linux
// 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/B6AC4C5C9F2EA3F2B3ECE1A33D349F4EE502B24E.bc --dump | FileCheck %s --check-prefix CHECK-H
// RUN: llvm-bcanalyzer %t/docs/bc/01A95F3F73F53281B3E50109A577FD2493159365.bc --dump | FileCheck %s --check-prefix CHECK-H-I
void H() {
class I {};
}
// CHECK-H: <BLOCKINFO_BLOCK/>
// CHECK-H-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-H-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-H-NEXT: </VersionBlock>
// CHECK-H-NEXT: <FunctionBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-H-NEXT: <USR abbrevid=4 op0=20 op1=182 op2=172 op3=76 op4=92 op5=159 op6=46 op7=163 op8=242 op9=179 op10=236 op11=225 op12=163 op13=61 op14=52 op15=159 op16=78 op17=229 op18=2 op19=178 op20=78/>
// CHECK-H-NEXT: <Name abbrevid=5 op0=1/> blob data = 'H'
// CHECK-H-NEXT: <DefLocation abbrevid=6 op0=12 op1={{[0-9]*}}/> blob data = '{{.*}}'
// CHECK-H-NEXT: <TypeBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-H-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-H-NEXT: <Name abbrevid=5 op0=4/> blob data = 'void'
// CHECK-H-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-H-NEXT: </ReferenceBlock>
// CHECK-H-NEXT: </TypeBlock>
// CHECK-H-NEXT: </FunctionBlock>
// CHECK-H-I: <BLOCKINFO_BLOCK/>
// CHECK-H-I-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-H-I-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-H-I-NEXT: </VersionBlock>
// CHECK-H-I-NEXT: <RecordBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-H-I-NEXT: <USR abbrevid=4 op0=20 op1=1 op2=169 op3=95 op4=63 op5=115 op6=245 op7=50 op8=129 op9=179 op10=229 op11=1 op12=9 op13=165 op14=119 op15=253 op16=36 op17=147 op18=21 op19=147 op20=101/>
// CHECK-H-I-NEXT: <Name abbrevid=5 op0=1/> blob data = 'I'
// CHECK-H-I-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-H-I-NEXT: <USR abbrevid=4 op0=20 op1=182 op2=172 op3=76 op4=92 op5=159 op6=46 op7=163 op8=242 op9=179 op10=236 op11=225 op12=163 op13=61 op14=52 op15=159 op16=78 op17=229 op18=2 op19=178 op20=78/>
// CHECK-H-I-NEXT: <Name abbrevid=5 op0=1/> blob data = 'H'
// CHECK-H-I-NEXT: <RefType abbrevid=6 op0=3/>
// CHECK-H-I-NEXT: <Field abbrevid=7 op0=1/>
// CHECK-H-I-NEXT: </ReferenceBlock>
// CHECK-H-I-NEXT: <DefLocation abbrevid=6 op0=13 op1={{[0-9]*}}/> blob data = '{{.*}}'
// CHECK-H-I-NEXT: <TagType abbrevid=8 op0=3/>
// CHECK-H-I-NEXT: </RecordBlock>

View File

@ -1,19 +0,0 @@
// 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/289584A8E0FF4178A794622A547AA622503967A1.bc --dump | FileCheck %s
class E {};
// CHECK: <BLOCKINFO_BLOCK/>
// CHECK-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-NEXT: </VersionBlock>
// CHECK-NEXT: <RecordBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <USR abbrevid=4 op0=20 op1=40 op2=149 op3=132 op4=168 op5=224 op6=255 op7=65 op8=120 op9=167 op10=148 op11=98 op12=42 op13=84 op14=122 op15=166 op16=34 op17=80 op18=57 op19=103 op20=161/>
// CHECK-NEXT: <Name abbrevid=5 op0=1/> blob data = 'E'
// CHECK-NEXT: <DefLocation abbrevid=6 op0=8 op1={{[0-9]*}}/> blob data = '{{.*}}'
// CHECK-NEXT: <TagType abbrevid=8 op0=3/>
// CHECK-NEXT: </RecordBlock>

View File

@ -0,0 +1,72 @@
// THIS IS A GENERATED TEST. DO NOT EDIT.
// To regenerate, see clang-doc/gen_test.py docstring.
//
// RUN: rm -rf %t
// RUN: mkdir %t
// RUN: echo "" > %t/compile_flags.txt
// RUN: cp "%s" "%t/test.cpp"
/// \brief Brief description.
///
/// Extended description that
/// continues onto the next line.
///
/// <ul class="test">
/// <li> Testing.
/// </ul>
///
/// \verbatim
/// The description continues.
/// \endverbatim
/// --
/// \param [out] I is a parameter.
/// \param J is a parameter.
/// \return void
void F(int I, int J);
/// Bonus comment on definition
void F(int I, int J) {}
// RUN: clang-doc --dump-mapper --doxygen -p %t %t/test.cpp -output=%t/docs
// RUN: llvm-bcanalyzer --dump %t/docs/bc/7574630614A535710E5A6ABCFFF98BCA2D06A4CA.bc | FileCheck %s --check-prefix CHECK-0
// CHECK-0: <BLOCKINFO_BLOCK/>
// CHECK-0-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-0-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-0-NEXT: </VersionBlock>
// CHECK-0-NEXT: <FunctionBlock NumWords=70 BlockCodeSize=4>
// CHECK-0-NEXT: <USR abbrevid=4 op0=20 op1=117 op2=116 op3=99 op4=6 op5=20 op6=165 op7=53 op8=113 op9=14 op10=90 op11=106 op12=188 op13=255 op14=249 op15=139 op16=202 op17=45 op18=6 op19=164 op20=202/>
// CHECK-0-NEXT: <Name abbrevid=5 op0=1/> blob data = 'F'
// CHECK-0-NEXT: <CommentBlock NumWords=28 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'FullComment'
// CHECK-0-NEXT: <CommentBlock NumWords=21 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=16/> blob data = 'ParagraphComment'
// CHECK-0-NEXT: <CommentBlock NumWords=13 BlockCodeSize=4>
// CHECK-0-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-0-NEXT: <Text abbrevid=5 op0=28/> blob data = ' Bonus comment on definition'
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: </CommentBlock>
// CHECK-0-NEXT: <DefLocation abbrevid=6 op0=28 op1=4/> blob data = '{{.*}}'
// CHECK-0-NEXT: <TypeBlock NumWords=6 BlockCodeSize=4>
// CHECK-0-NEXT: <ReferenceBlock NumWords=3 BlockCodeSize=4>
// CHECK-0-NEXT: <Name abbrevid=5 op0=4/> blob data = 'void'
// CHECK-0-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-0-NEXT: </ReferenceBlock>
// CHECK-0-NEXT: </TypeBlock>
// CHECK-0-NEXT: <FieldTypeBlock NumWords=8 BlockCodeSize=4>
// CHECK-0-NEXT: <ReferenceBlock NumWords=3 BlockCodeSize=4>
// CHECK-0-NEXT: <Name abbrevid=5 op0=3/> blob data = 'int'
// CHECK-0-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-0-NEXT: </ReferenceBlock>
// CHECK-0-NEXT: <Name abbrevid=4 op0=1/> blob data = 'I'
// CHECK-0-NEXT: </FieldTypeBlock>
// CHECK-0-NEXT: <FieldTypeBlock NumWords=8 BlockCodeSize=4>
// CHECK-0-NEXT: <ReferenceBlock NumWords=3 BlockCodeSize=4>
// CHECK-0-NEXT: <Name abbrevid=5 op0=3/> blob data = 'int'
// CHECK-0-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-0-NEXT: </ReferenceBlock>
// CHECK-0-NEXT: <Name abbrevid=4 op0=1/> blob data = 'J'
// CHECK-0-NEXT: </FieldTypeBlock>
// CHECK-0-NEXT: </FunctionBlock>

View File

@ -1,181 +0,0 @@
// 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/7574630614A535710E5A6ABCFFF98BCA2D06A4CA.bc --dump | FileCheck %s
/// \brief Brief description.
///
/// Extended description that
/// continues onto the next line.
///
/// <ul> class="test">
/// <li> Testing.
/// </ul>
///
/// \verbatim
/// The description continues.
/// \endverbatim
///
/// \param [out] I is a parameter.
/// \param J is a parameter.
/// \return int
int F(int I, int J);
// CHECK: <BLOCKINFO_BLOCK/>
// CHECK-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-NEXT: </VersionBlock>
// CHECK-NEXT: <FunctionBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <USR abbrevid=4 op0=20 op1=117 op2=116 op3=99 op4=6 op5=20 op6=165 op7=53 op8=113 op9=14 op10=90 op11=106 op12=188 op13=255 op14=249 op15=139 op16=202 op17=45 op18=6 op19=164 op20=202/>
// CHECK-NEXT: <Name abbrevid=5 op0=1/> blob data = 'F'
// CHECK-NEXT: <CommentBlock NumWords=351 BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'FullComment'
// CHECK-NEXT: <CommentBlock NumWords=13 BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=16/> blob data = 'ParagraphComment'
// CHECK-NEXT: <CommentBlock NumWords=5 BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <CommentBlock NumWords=31 BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=19/> blob data = 'BlockCommandComment'
// CHECK-NEXT: <Name abbrevid=6 op0=5/> blob data = 'brief'
// CHECK-NEXT: <CommentBlock NumWords=19 BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=16/> blob data = 'ParagraphComment'
// CHECK-NEXT: <CommentBlock NumWords=11 BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-NEXT: <Text abbrevid=5 op0=19/> blob data = ' Brief description.'
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <CommentBlock NumWords=37 BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=16/> blob data = 'ParagraphComment'
// CHECK-NEXT: <CommentBlock NumWords=13 BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-NEXT: <Text abbrevid=5 op0=26/> blob data = ' Extended description that'
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <CommentBlock NumWords=14 BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-NEXT: <Text abbrevid=5 op0=30/> blob data = ' continues onto the next line.'
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <CommentBlock NumWords=83 BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=16/> blob data = 'ParagraphComment'
// CHECK-NEXT: <CommentBlock NumWords=5 BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <CommentBlock NumWords=9 BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=19/> blob data = 'HTMLStartTagComment'
// CHECK-NEXT: <Name abbrevid=6 op0=2/> blob data = 'ul'
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <CommentBlock NumWords=10 BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-NEXT: <Text abbrevid=5 op0=14/> blob data = ' class="test">'
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <CommentBlock NumWords=5 BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <CommentBlock NumWords=9 BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=19/> blob data = 'HTMLStartTagComment'
// CHECK-NEXT: <Name abbrevid=6 op0=2/> blob data = 'li'
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <CommentBlock NumWords=9 BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-NEXT: <Text abbrevid=5 op0=9/> blob data = ' Testing.'
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <CommentBlock NumWords=5 BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <CommentBlock NumWords=9 BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=17/> blob data = 'HTMLEndTagComment'
// CHECK-NEXT: <Name abbrevid=6 op0=2/> blob data = 'ul'
// CHECK-NEXT: <SelfClosing abbrevid=10 op0=1/>
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <CommentBlock NumWords=13 BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=16/> blob data = 'ParagraphComment'
// CHECK-NEXT: <CommentBlock NumWords=5 BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <CommentBlock NumWords=32 BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=20/> blob data = 'VerbatimBlockComment'
// CHECK-NEXT: <Name abbrevid=6 op0=8/> blob data = 'verbatim'
// CHECK-NEXT: <CloseName abbrevid=9 op0=11/> blob data = 'endverbatim'
// CHECK-NEXT: <CommentBlock NumWords=16 BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=24/> blob data = 'VerbatimBlockLineComment'
// CHECK-NEXT: <Text abbrevid=5 op0=27/> blob data = ' The description continues.'
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <CommentBlock NumWords=13 BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=16/> blob data = 'ParagraphComment'
// CHECK-NEXT: <CommentBlock NumWords=5 BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <CommentBlock NumWords=39 BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=19/> blob data = 'ParamCommandComment'
// CHECK-NEXT: <Direction abbrevid=7 op0=5/> blob data = '[out]'
// CHECK-NEXT: <ParamName abbrevid=8 op0=1/> blob data = 'I'
// CHECK-NEXT: <Explicit abbrevid=11 op0=1/>
// CHECK-NEXT: <CommentBlock NumWords=25 BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=16/> blob data = 'ParagraphComment'
// CHECK-NEXT: <CommentBlock NumWords=10 BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-NEXT: <Text abbrevid=5 op0=16/> blob data = ' is a parameter.'
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <CommentBlock NumWords=5 BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <CommentBlock NumWords=38 BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=19/> blob data = 'ParamCommandComment'
// CHECK-NEXT: <Direction abbrevid=7 op0=4/> blob data = '[in]'
// CHECK-NEXT: <ParamName abbrevid=8 op0=1/> blob data = 'J'
// CHECK-NEXT: <CommentBlock NumWords=25 BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=16/> blob data = 'ParagraphComment'
// CHECK-NEXT: <CommentBlock NumWords=10 BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-NEXT: <Text abbrevid=5 op0=16/> blob data = ' is a parameter.'
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <CommentBlock NumWords=5 BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <CommentBlock NumWords=27 BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=19/> blob data = 'BlockCommandComment'
// CHECK-NEXT: <Name abbrevid=6 op0=6/> blob data = 'return'
// CHECK-NEXT: <CommentBlock NumWords=15 BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=16/> blob data = 'ParagraphComment'
// CHECK-NEXT: <CommentBlock NumWords=7 BlockCodeSize=4>
// CHECK-NEXT: <Kind abbrevid=4 op0=11/> blob data = 'TextComment'
// CHECK-NEXT: <Text abbrevid=5 op0=4/> blob data = ' int'
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: </CommentBlock>
// CHECK-NEXT: <Location abbrevid=7 op0=24 op1={{[0-9]*}}/> blob data = '{{.*}}'
// CHECK-NEXT: <TypeBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Name abbrevid=5 op0=3/> blob data = 'int'
// CHECK-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-NEXT: </ReferenceBlock>
// CHECK-NEXT: </TypeBlock>
// CHECK-NEXT: <FieldTypeBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Name abbrevid=5 op0=3/> blob data = 'int'
// CHECK-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-NEXT: </ReferenceBlock>
// CHECK-NEXT: <Name abbrevid=4 op0=1/> blob data = 'I'
// CHECK-NEXT: </FieldTypeBlock>
// CHECK-NEXT: <FieldTypeBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Name abbrevid=5 op0=3/> blob data = 'int'
// CHECK-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-NEXT: </ReferenceBlock>
// CHECK-NEXT: <Name abbrevid=4 op0=1/> blob data = 'J'
// CHECK-NEXT: </FieldTypeBlock>
// CHECK-NEXT: </FunctionBlock>

View File

@ -1,36 +0,0 @@
// 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/FC07BD34D5E77782C263FA944447929EA8753740.bc --dump | FileCheck %s --check-prefix CHECK-B
// RUN: llvm-bcanalyzer %t/docs/bc/020E6C32A700C3170C009FCCD41671EDDBEAF575.bc --dump | FileCheck %s --check-prefix CHECK-C
enum B { X, Y };
// CHECK-B: <BLOCKINFO_BLOCK/>
// CHECK-B-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-B-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-B-NEXT: </VersionBlock>
// CHECK-B-NEXT: <EnumBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-B-NEXT: <USR abbrevid=4 op0=20 op1=252 op2=7 op3=189 op4=52 op5=213 op6=231 op7=119 op8=130 op9=194 op10=99 op11=250 op12=148 op13=68 op14=71 op15=146 op16=158 op17=168 op18=117 op19=55 op20=64/>
// CHECK-B-NEXT: <Name abbrevid=5 op0=1/> blob data = 'B'
// CHECK-B-NEXT: <DefLocation abbrevid=6 op0=9 op1={{[0-9]*}}/> blob data = '{{.*}}'
// CHECK-B-NEXT: <Member abbrevid=8 op0=1/> blob data = 'X'
// CHECK-B-NEXT: <Member abbrevid=8 op0=1/> blob data = 'Y'
// CHECK-B-NEXT: </EnumBlock>
enum class C { A, B };
// CHECK-C: <BLOCKINFO_BLOCK/>
// CHECK-C-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-C-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-C-NEXT: </VersionBlock>
// CHECK-C-NEXT: <EnumBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-C-NEXT: <USR abbrevid=4 op0=20 op1=2 op2=14 op3=108 op4=50 op5=167 op6=0 op7=195 op8=23 op9=12 op10=0 op11=159 op12=204 op13=212 op14=22 op15=113 op16=237 op17=219 op18=234 op19=245 op20=117/>
// CHECK-C-NEXT: <Name abbrevid=5 op0=1/> blob data = 'C'
// CHECK-C-NEXT: <DefLocation abbrevid=6 op0=23 op1={{[0-9]*}}/> blob data = '{{.*}}'
// CHECK-C-NEXT: <Scoped abbrevid=9 op0=1/>
// CHECK-C-NEXT: <Member abbrevid=8 op0=1/> blob data = 'A'
// CHECK-C-NEXT: <Member abbrevid=8 op0=1/> blob data = 'B'
// CHECK-C-NEXT: </EnumBlock>

View File

@ -1,31 +0,0 @@
// 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/A44B32CC3C087C9AF75DAF50DE193E85E7B2C16B.bc --dump | FileCheck %s
int F(int param) { return param; }
// CHECK: <BLOCKINFO_BLOCK/>
// CHECK-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-NEXT: </VersionBlock>
// CHECK-NEXT: <FunctionBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <USR abbrevid=4 op0=20 op1=164 op2=75 op3=50 op4=204 op5=60 op6=8 op7=124 op8=154 op9=247 op10=93 op11=175 op12=80 op13=222 op14=25 op15=62 op16=133 op17=231 op18=178 op19=193 op20=107/>
// CHECK-NEXT: <Name abbrevid=5 op0=1/> blob data = 'F'
// CHECK-NEXT: <DefLocation abbrevid=6 op0=8 op1={{[0-9]*}}/> blob data = '{{.*}}'
// CHECK-NEXT: <TypeBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Name abbrevid=5 op0=3/> blob data = 'int'
// CHECK-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-NEXT: </ReferenceBlock>
// CHECK-NEXT: </TypeBlock>
// CHECK-NEXT: <FieldTypeBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Name abbrevid=5 op0=3/> blob data = 'int'
// CHECK-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-NEXT: </ReferenceBlock>
// CHECK-NEXT: <Name abbrevid=4 op0=5/> blob data = 'param'
// CHECK-NEXT: </FieldTypeBlock>
// CHECK-NEXT: </FunctionBlock>

View File

@ -1,59 +0,0 @@
// 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/F0F9FC65FC90F54F690144A7AFB15DFC3D69B6E6.bc --dump | FileCheck %s --check-prefix CHECK-G-F
// RUN: llvm-bcanalyzer %t/docs/bc/4202E8BF0ECB12AE354C8499C52725B0EE30AED5.bc --dump | FileCheck %s --check-prefix CHECK-G
class G {
public:
int Method(int param) { return param; }
};
// CHECK-G: <BLOCKINFO_BLOCK/>
// CHECK-G-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-G-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-G-NEXT: </VersionBlock>
// CHECK-G-NEXT: <RecordBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-G-NEXT: <USR abbrevid=4 op0=20 op1=66 op2=2 op3=232 op4=191 op5=14 op6=203 op7=18 op8=174 op9=53 op10=76 op11=132 op12=153 op13=197 op14=39 op15=37 op16=176 op17=238 op18=48 op19=174 op20=213/>
// CHECK-G-NEXT: <Name abbrevid=5 op0=1/> blob data = 'G'
// CHECK-G-NEXT: <DefLocation abbrevid=6 op0=9 op1={{[0-9]*}}/> blob data = '{{.*}}'
// CHECK-G-NEXT: <TagType abbrevid=8 op0=3/>
// CHECK-G-NEXT: </RecordBlock>
// CHECK-G-F: <BLOCKINFO_BLOCK/>
// CHECK-G-F-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-G-F-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-G-F-NEXT: </VersionBlock>
// CHECK-G-F-NEXT: <FunctionBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-G-F-NEXT: <USR abbrevid=4 op0=20 op1=240 op2=249 op3=252 op4=101 op5=252 op6=144 op7=245 op8=79 op9=105 op10=1 op11=68 op12=167 op13=175 op14=177 op15=93 op16=252 op17=61 op18=105 op19=182 op20=230/>
// CHECK-G-F-NEXT: <Name abbrevid=5 op0=6/> blob data = 'Method'
// CHECK-G-F-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-G-F-NEXT: <USR abbrevid=4 op0=20 op1=66 op2=2 op3=232 op4=191 op5=14 op6=203 op7=18 op8=174 op9=53 op10=76 op11=132 op12=153 op13=197 op14=39 op15=37 op16=176 op17=238 op18=48 op19=174 op20=213/>
// CHECK-G-F-NEXT: <Name abbrevid=5 op0=1/> blob data = 'G'
// CHECK-G-F-NEXT: <RefType abbrevid=6 op0=2/>
// CHECK-G-F-NEXT: <Field abbrevid=7 op0=1/>
// CHECK-G-F-NEXT: </ReferenceBlock>
// CHECK-G-F-NEXT: <IsMethod abbrevid=9 op0=1/>
// CHECK-G-F-NEXT: <DefLocation abbrevid=6 op0=11 op1={{[0-9]*}}/> blob data = '{{.*}}'
// CHECK-G-F-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-G-F-NEXT: <USR abbrevid=4 op0=20 op1=66 op2=2 op3=232 op4=191 op5=14 op6=203 op7=18 op8=174 op9=53 op10=76 op11=132 op12=153 op13=197 op14=39 op15=37 op16=176 op17=238 op18=48 op19=174 op20=213/>
// CHECK-G-F-NEXT: <Name abbrevid=5 op0=1/> blob data = 'G'
// CHECK-G-F-NEXT: <RefType abbrevid=6 op0=2/>
// CHECK-G-F-NEXT: <Field abbrevid=7 op0=2/>
// CHECK-G-F-NEXT: </ReferenceBlock>
// CHECK-G-F-NEXT: <TypeBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-G-F-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-G-F-NEXT: <Name abbrevid=5 op0=3/> blob data = 'int'
// CHECK-G-F-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-G-F-NEXT: </ReferenceBlock>
// CHECK-G-F-NEXT: </TypeBlock>
// CHECK-G-F-NEXT: <FieldTypeBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-G-F-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-G-F-NEXT: <Name abbrevid=5 op0=3/> blob data = 'int'
// CHECK-G-F-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-G-F-NEXT: </ReferenceBlock>
// CHECK-G-F-NEXT: <Name abbrevid=4 op0=5/> blob data = 'param'
// CHECK-G-F-NEXT: </FieldTypeBlock>
// CHECK-G-F-NEXT: </FunctionBlock>

View File

@ -1,17 +1,138 @@
// THIS IS A GENERATED TEST. DO NOT EDIT.
// To regenerate, see clang-doc/gen_test.py docstring.
//
// 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/8D042EFFC98B373450BC6B5B90A330C25A150E9C.bc --dump | FileCheck %s
namespace A {}
namespace A {
void f();
// CHECK: <BLOCKINFO_BLOCK/>
// CHECK-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-NEXT: </VersionBlock>
// CHECK-NEXT: <NamespaceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <USR abbrevid=4 op0=20 op1=141 op2=4 op3=46 op4=255 op5=201 op6=139 op7=55 op8=52 op9=80 op10=188 op11=107 op12=91 op13=144 op14=163 op15=48 op16=194 op17=90 op18=21 op19=14 op20=156/>
// CHECK-NEXT: <Name abbrevid=5 op0=1/> blob data = 'A'
// CHECK-NEXT: </NamespaceBlock>
} // namespace A
namespace A {
void f(){};
namespace B {
enum E { X };
E func(int i) { return X; }
} // namespace B
} // namespace A
// RUN: clang-doc --dump-mapper --doxygen -p %t %t/test.cpp -output=%t/docs
// RUN: llvm-bcanalyzer --dump %t/docs/bc/E9ABF7E7E2425B626723D41E76E4BC7E7A5BD775.bc | FileCheck %s --check-prefix CHECK-0
// CHECK-0: <BLOCKINFO_BLOCK/>
// CHECK-0-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-0-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-0-NEXT: </VersionBlock>
// CHECK-0-NEXT: <EnumBlock NumWords=38 BlockCodeSize=4>
// CHECK-0-NEXT: <USR abbrevid=4 op0=20 op1=233 op2=171 op3=247 op4=231 op5=226 op6=66 op7=91 op8=98 op9=103 op10=35 op11=212 op12=30 op13=118 op14=228 op15=188 op16=126 op17=122 op18=91 op19=215 op20=117/>
// CHECK-0-NEXT: <Name abbrevid=5 op0=1/> blob data = 'E'
// CHECK-0-NEXT: <ReferenceBlock NumWords=10 BlockCodeSize=4>
// CHECK-0-NEXT: <USR abbrevid=4 op0=20 op1=226 op2=26 op3=247 op4=158 op5=42 op6=157 op7=2 op8=85 op9=75 op10=160 op11=144 op12=209 op13=13 op14=243 op15=159 op16=226 op17=115 op18=245 op19=205 op20=181/>
// CHECK-0-NEXT: <Name abbrevid=5 op0=1/> blob data = 'B'
// CHECK-0-NEXT: <RefType abbrevid=6 op0=1/>
// CHECK-0-NEXT: <Field abbrevid=7 op0=1/>
// CHECK-0-NEXT: </ReferenceBlock>
// CHECK-0-NEXT: <ReferenceBlock NumWords=10 BlockCodeSize=4>
// CHECK-0-NEXT: <USR abbrevid=4 op0=20 op1=141 op2=4 op3=46 op4=255 op5=201 op6=139 op7=55 op8=52 op9=80 op10=188 op11=107 op12=91 op13=144 op14=163 op15=48 op16=194 op17=90 op18=21 op19=14 op20=156/>
// CHECK-0-NEXT: <Name abbrevid=5 op0=1/> blob data = 'A'
// CHECK-0-NEXT: <RefType abbrevid=6 op0=1/>
// CHECK-0-NEXT: <Field abbrevid=7 op0=1/>
// CHECK-0-NEXT: </ReferenceBlock>
// CHECK-0-NEXT: <DefLocation abbrevid=6 op0=21 op1=4/> blob data = '{{.*}}'
// CHECK-0-NEXT: <Member abbrevid=8 op0=1/> blob data = 'X'
// CHECK-0-NEXT: </EnumBlock>
// RUN: llvm-bcanalyzer --dump %t/docs/bc/39D3C95A5F7CE2BA4937BD7B01BAE09EBC2AD8AC.bc | FileCheck %s --check-prefix CHECK-1
// CHECK-1: <BLOCKINFO_BLOCK/>
// CHECK-1-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-1-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-1-NEXT: </VersionBlock>
// CHECK-1-NEXT: <FunctionBlock NumWords=32 BlockCodeSize=4>
// CHECK-1-NEXT: <USR abbrevid=4 op0=20 op1=57 op2=211 op3=201 op4=90 op5=95 op6=124 op7=226 op8=186 op9=73 op10=55 op11=189 op12=123 op13=1 op14=186 op15=224 op16=158 op17=188 op18=42 op19=216 op20=172/>
// CHECK-1-NEXT: <Name abbrevid=5 op0=1/> blob data = 'f'
// CHECK-1-NEXT: <ReferenceBlock NumWords=10 BlockCodeSize=4>
// CHECK-1-NEXT: <USR abbrevid=4 op0=20 op1=141 op2=4 op3=46 op4=255 op5=201 op6=139 op7=55 op8=52 op9=80 op10=188 op11=107 op12=91 op13=144 op14=163 op15=48 op16=194 op17=90 op18=21 op19=14 op20=156/>
// CHECK-1-NEXT: <Name abbrevid=5 op0=1/> blob data = 'A'
// CHECK-1-NEXT: <RefType abbrevid=6 op0=1/>
// CHECK-1-NEXT: <Field abbrevid=7 op0=1/>
// CHECK-1-NEXT: </ReferenceBlock>
// CHECK-1-NEXT: <DefLocation abbrevid=6 op0=17 op1=4/> blob data = '{{.*}}'
// CHECK-1-NEXT: <TypeBlock NumWords=6 BlockCodeSize=4>
// CHECK-1-NEXT: <ReferenceBlock NumWords=3 BlockCodeSize=4>
// CHECK-1-NEXT: <Name abbrevid=5 op0=4/> blob data = 'void'
// CHECK-1-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-1-NEXT: </ReferenceBlock>
// CHECK-1-NEXT: </TypeBlock>
// CHECK-1-NEXT: </FunctionBlock>
// RUN: llvm-bcanalyzer --dump %t/docs/bc/9A82CB33ED0FDF81EE383D31CD0957D153C5E840.bc | FileCheck %s --check-prefix CHECK-2
// CHECK-2: <BLOCKINFO_BLOCK/>
// CHECK-2-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-2-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-2-NEXT: </VersionBlock>
// CHECK-2-NEXT: <FunctionBlock NumWords=56 BlockCodeSize=4>
// CHECK-2-NEXT: <USR abbrevid=4 op0=20 op1=154 op2=130 op3=203 op4=51 op5=237 op6=15 op7=223 op8=129 op9=238 op10=56 op11=61 op12=49 op13=205 op14=9 op15=87 op16=209 op17=83 op18=197 op19=232 op20=64/>
// CHECK-2-NEXT: <Name abbrevid=5 op0=4/> blob data = 'func'
// CHECK-2-NEXT: <ReferenceBlock NumWords=10 BlockCodeSize=4>
// CHECK-2-NEXT: <USR abbrevid=4 op0=20 op1=226 op2=26 op3=247 op4=158 op5=42 op6=157 op7=2 op8=85 op9=75 op10=160 op11=144 op12=209 op13=13 op14=243 op15=159 op16=226 op17=115 op18=245 op19=205 op20=181/>
// CHECK-2-NEXT: <Name abbrevid=5 op0=1/> blob data = 'B'
// CHECK-2-NEXT: <RefType abbrevid=6 op0=1/>
// CHECK-2-NEXT: <Field abbrevid=7 op0=1/>
// CHECK-2-NEXT: </ReferenceBlock>
// CHECK-2-NEXT: <ReferenceBlock NumWords=10 BlockCodeSize=4>
// CHECK-2-NEXT: <USR abbrevid=4 op0=20 op1=141 op2=4 op3=46 op4=255 op5=201 op6=139 op7=55 op8=52 op9=80 op10=188 op11=107 op12=91 op13=144 op14=163 op15=48 op16=194 op17=90 op18=21 op19=14 op20=156/>
// CHECK-2-NEXT: <Name abbrevid=5 op0=1/> blob data = 'A'
// CHECK-2-NEXT: <RefType abbrevid=6 op0=1/>
// CHECK-2-NEXT: <Field abbrevid=7 op0=1/>
// CHECK-2-NEXT: </ReferenceBlock>
// CHECK-2-NEXT: <DefLocation abbrevid=6 op0=23 op1=4/> blob data = '{{.*}}'
// CHECK-2-NEXT: <TypeBlock NumWords=8 BlockCodeSize=4>
// CHECK-2-NEXT: <ReferenceBlock NumWords=5 BlockCodeSize=4>
// CHECK-2-NEXT: <Name abbrevid=5 op0=12/> blob data = 'enum A::B::E'
// CHECK-2-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-2-NEXT: </ReferenceBlock>
// CHECK-2-NEXT: </TypeBlock>
// CHECK-2-NEXT: <FieldTypeBlock NumWords=8 BlockCodeSize=4>
// CHECK-2-NEXT: <ReferenceBlock NumWords=3 BlockCodeSize=4>
// CHECK-2-NEXT: <Name abbrevid=5 op0=3/> blob data = 'int'
// CHECK-2-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-2-NEXT: </ReferenceBlock>
// CHECK-2-NEXT: <Name abbrevid=4 op0=1/> blob data = 'i'
// CHECK-2-NEXT: </FieldTypeBlock>
// CHECK-2-NEXT: </FunctionBlock>
// RUN: llvm-bcanalyzer --dump %t/docs/bc/8D042EFFC98B373450BC6B5B90A330C25A150E9C.bc | FileCheck %s --check-prefix CHECK-3
// CHECK-3: <BLOCKINFO_BLOCK/>
// CHECK-3-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-3-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-3-NEXT: </VersionBlock>
// CHECK-3-NEXT: <NamespaceBlock NumWords=9 BlockCodeSize=4>
// CHECK-3-NEXT: <USR abbrevid=4 op0=20 op1=141 op2=4 op3=46 op4=255 op5=201 op6=139 op7=55 op8=52 op9=80 op10=188 op11=107 op12=91 op13=144 op14=163 op15=48 op16=194 op17=90 op18=21 op19=14 op20=156/>
// CHECK-3-NEXT: <Name abbrevid=5 op0=1/> blob data = 'A'
// CHECK-3-NEXT: </NamespaceBlock>
// RUN: llvm-bcanalyzer --dump %t/docs/bc/E21AF79E2A9D02554BA090D10DF39FE273F5CDB5.bc | FileCheck %s --check-prefix CHECK-4
// CHECK-4: <BLOCKINFO_BLOCK/>
// CHECK-4-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-4-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-4-NEXT: </VersionBlock>
// CHECK-4-NEXT: <NamespaceBlock NumWords=21 BlockCodeSize=4>
// CHECK-4-NEXT: <USR abbrevid=4 op0=20 op1=226 op2=26 op3=247 op4=158 op5=42 op6=157 op7=2 op8=85 op9=75 op10=160 op11=144 op12=209 op13=13 op14=243 op15=159 op16=226 op17=115 op18=245 op19=205 op20=181/>
// CHECK-4-NEXT: <Name abbrevid=5 op0=1/> blob data = 'B'
// CHECK-4-NEXT: <ReferenceBlock NumWords=10 BlockCodeSize=4>
// CHECK-4-NEXT: <USR abbrevid=4 op0=20 op1=141 op2=4 op3=46 op4=255 op5=201 op6=139 op7=55 op8=52 op9=80 op10=188 op11=107 op12=91 op13=144 op14=163 op15=48 op16=194 op17=90 op18=21 op19=14 op20=156/>
// CHECK-4-NEXT: <Name abbrevid=5 op0=1/> blob data = 'A'
// CHECK-4-NEXT: <RefType abbrevid=6 op0=1/>
// CHECK-4-NEXT: <Field abbrevid=7 op0=1/>
// CHECK-4-NEXT: </ReferenceBlock>
// CHECK-4-NEXT: </NamespaceBlock>

View File

@ -0,0 +1,317 @@
// THIS IS A GENERATED TEST. DO NOT EDIT.
// To regenerate, see clang-doc/gen_test.py docstring.
//
// This test requires Linux due to system-dependent USR for the inner class.
// REQUIRES: system-linux
// RUN: rm -rf %t
// RUN: mkdir %t
// RUN: echo "" > %t/compile_flags.txt
// RUN: cp "%s" "%t/test.cpp"
void H() {
class I {};
}
union A { int X; int Y; };
enum B { X, Y };
enum class Bc { A, B };
struct C { int i; };
class D {};
class E {
public:
E() {}
~E() {}
protected:
void ProtectedMethod();
};
void E::ProtectedMethod() {}
class F : virtual private D, public E {};
class X {
class Y {};
};
// RUN: clang-doc --dump-mapper --doxygen -p %t %t/test.cpp -output=%t/docs
// RUN: llvm-bcanalyzer --dump %t/docs/bc/289584A8E0FF4178A794622A547AA622503967A1.bc | FileCheck %s --check-prefix CHECK-0
// CHECK-0: <BLOCKINFO_BLOCK/>
// CHECK-0-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-0-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-0-NEXT: </VersionBlock>
// CHECK-0-NEXT: <RecordBlock NumWords=12 BlockCodeSize=4>
// CHECK-0-NEXT: <USR abbrevid=4 op0=20 op1=40 op2=149 op3=132 op4=168 op5=224 op6=255 op7=65 op8=120 op9=167 op10=148 op11=98 op12=42 op13=84 op14=122 op15=166 op16=34 op17=80 op18=57 op19=103 op20=161/>
// CHECK-0-NEXT: <Name abbrevid=5 op0=1/> blob data = 'E'
// CHECK-0-NEXT: <DefLocation abbrevid=6 op0=25 op1=4/> blob data = '{{.*}}'
// CHECK-0-NEXT: <TagType abbrevid=8 op0=3/>
// CHECK-0-NEXT: </RecordBlock>
// RUN: llvm-bcanalyzer --dump %t/docs/bc/3FB542274573CAEAD54CEBFFCAEE3D77FB9713D8.bc | FileCheck %s --check-prefix CHECK-1
// CHECK-1: <BLOCKINFO_BLOCK/>
// CHECK-1-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-1-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-1-NEXT: </VersionBlock>
// CHECK-1-NEXT: <RecordBlock NumWords=24 BlockCodeSize=4>
// CHECK-1-NEXT: <USR abbrevid=4 op0=20 op1=63 op2=181 op3=66 op4=39 op5=69 op6=115 op7=202 op8=234 op9=213 op10=76 op11=235 op12=255 op13=202 op14=238 op15=61 op16=119 op17=251 op18=151 op19=19 op20=216/>
// CHECK-1-NEXT: <Name abbrevid=5 op0=1/> blob data = 'I'
// CHECK-1-NEXT: <ReferenceBlock NumWords=10 BlockCodeSize=4>
// CHECK-1-NEXT: <USR abbrevid=4 op0=20 op1=182 op2=172 op3=76 op4=92 op5=159 op6=46 op7=163 op8=242 op9=179 op10=236 op11=225 op12=163 op13=61 op14=52 op15=159 op16=78 op17=229 op18=2 op19=178 op20=78/>
// CHECK-1-NEXT: <Name abbrevid=5 op0=1/> blob data = 'H'
// CHECK-1-NEXT: <RefType abbrevid=6 op0=3/>
// CHECK-1-NEXT: <Field abbrevid=7 op0=1/>
// CHECK-1-NEXT: </ReferenceBlock>
// CHECK-1-NEXT: <DefLocation abbrevid=6 op0=12 op1=4/> blob data = '{{.*}}'
// CHECK-1-NEXT: <TagType abbrevid=8 op0=3/>
// CHECK-1-NEXT: </RecordBlock>
// RUN: llvm-bcanalyzer --dump %t/docs/bc/5093D428CDC62096A67547BA52566E4FB9404EEE.bc | FileCheck %s --check-prefix CHECK-2
// CHECK-2: <BLOCKINFO_BLOCK/>
// CHECK-2-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-2-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-2-NEXT: </VersionBlock>
// CHECK-2-NEXT: <FunctionBlock NumWords=47 BlockCodeSize=4>
// CHECK-2-NEXT: <USR abbrevid=4 op0=20 op1=80 op2=147 op3=212 op4=40 op5=205 op6=198 op7=32 op8=150 op9=166 op10=117 op11=71 op12=186 op13=82 op14=86 op15=110 op16=79 op17=185 op18=64 op19=78 op20=238/>
// CHECK-2-NEXT: <Name abbrevid=5 op0=15/> blob data = 'ProtectedMethod'
// CHECK-2-NEXT: <ReferenceBlock NumWords=10 BlockCodeSize=4>
// CHECK-2-NEXT: <USR abbrevid=4 op0=20 op1=40 op2=149 op3=132 op4=168 op5=224 op6=255 op7=65 op8=120 op9=167 op10=148 op11=98 op12=42 op13=84 op14=122 op15=166 op16=34 op17=80 op18=57 op19=103 op20=161/>
// CHECK-2-NEXT: <Name abbrevid=5 op0=1/> blob data = 'E'
// CHECK-2-NEXT: <RefType abbrevid=6 op0=2/>
// CHECK-2-NEXT: <Field abbrevid=7 op0=1/>
// CHECK-2-NEXT: </ReferenceBlock>
// CHECK-2-NEXT: <IsMethod abbrevid=9 op0=1/>
// CHECK-2-NEXT: <DefLocation abbrevid=6 op0=34 op1=4/> blob data = '{{.*}}'
// CHECK-2-NEXT: <ReferenceBlock NumWords=10 BlockCodeSize=4>
// CHECK-2-NEXT: <USR abbrevid=4 op0=20 op1=40 op2=149 op3=132 op4=168 op5=224 op6=255 op7=65 op8=120 op9=167 op10=148 op11=98 op12=42 op13=84 op14=122 op15=166 op16=34 op17=80 op18=57 op19=103 op20=161/>
// CHECK-2-NEXT: <Name abbrevid=5 op0=1/> blob data = 'E'
// CHECK-2-NEXT: <RefType abbrevid=6 op0=2/>
// CHECK-2-NEXT: <Field abbrevid=7 op0=2/>
// CHECK-2-NEXT: </ReferenceBlock>
// CHECK-2-NEXT: <TypeBlock NumWords=6 BlockCodeSize=4>
// CHECK-2-NEXT: <ReferenceBlock NumWords=3 BlockCodeSize=4>
// CHECK-2-NEXT: <Name abbrevid=5 op0=4/> blob data = 'void'
// CHECK-2-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-2-NEXT: </ReferenceBlock>
// CHECK-2-NEXT: </TypeBlock>
// CHECK-2-NEXT: </FunctionBlock>
// RUN: llvm-bcanalyzer --dump %t/docs/bc/CA7C7935730B5EACD25F080E9C83FA087CCDC75E.bc | FileCheck %s --check-prefix CHECK-3
// CHECK-3: <BLOCKINFO_BLOCK/>
// CHECK-3-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-3-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-3-NEXT: </VersionBlock>
// CHECK-3-NEXT: <RecordBlock NumWords=12 BlockCodeSize=4>
// CHECK-3-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-3-NEXT: <Name abbrevid=5 op0=1/> blob data = 'X'
// CHECK-3-NEXT: <DefLocation abbrevid=6 op0=38 op1=4/> blob data = '{{.*}}'
// CHECK-3-NEXT: <TagType abbrevid=8 op0=3/>
// CHECK-3-NEXT: </RecordBlock>
// RUN: llvm-bcanalyzer --dump %t/docs/bc/B6AC4C5C9F2EA3F2B3ECE1A33D349F4EE502B24E.bc | FileCheck %s --check-prefix CHECK-4
// CHECK-4: <BLOCKINFO_BLOCK/>
// CHECK-4-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-4-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-4-NEXT: </VersionBlock>
// CHECK-4-NEXT: <FunctionBlock NumWords=20 BlockCodeSize=4>
// CHECK-4-NEXT: <USR abbrevid=4 op0=20 op1=182 op2=172 op3=76 op4=92 op5=159 op6=46 op7=163 op8=242 op9=179 op10=236 op11=225 op12=163 op13=61 op14=52 op15=159 op16=78 op17=229 op18=2 op19=178 op20=78/>
// CHECK-4-NEXT: <Name abbrevid=5 op0=1/> blob data = 'H'
// CHECK-4-NEXT: <DefLocation abbrevid=6 op0=11 op1=4/> blob data = '{{.*}}'
// CHECK-4-NEXT: <TypeBlock NumWords=6 BlockCodeSize=4>
// CHECK-4-NEXT: <ReferenceBlock NumWords=3 BlockCodeSize=4>
// CHECK-4-NEXT: <Name abbrevid=5 op0=4/> blob data = 'void'
// CHECK-4-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-4-NEXT: </ReferenceBlock>
// CHECK-4-NEXT: </TypeBlock>
// CHECK-4-NEXT: </FunctionBlock>
// RUN: llvm-bcanalyzer --dump %t/docs/bc/06B5F6A19BA9F6A832E127C9968282B94619B210.bc | FileCheck %s --check-prefix CHECK-5
// CHECK-5: <BLOCKINFO_BLOCK/>
// CHECK-5-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-5-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-5-NEXT: </VersionBlock>
// CHECK-5-NEXT: <RecordBlock NumWords=22 BlockCodeSize=4>
// CHECK-5-NEXT: <USR abbrevid=4 op0=20 op1=6 op2=181 op3=246 op4=161 op5=155 op6=169 op7=246 op8=168 op9=50 op10=225 op11=39 op12=201 op13=150 op14=130 op15=130 op16=185 op17=70 op18=25 op19=178 op20=16/>
// CHECK-5-NEXT: <Name abbrevid=5 op0=1/> blob data = 'C'
// CHECK-5-NEXT: <DefLocation abbrevid=6 op0=21 op1=4/> blob data = '{{.*}}'
// CHECK-5-NEXT: <MemberTypeBlock NumWords=8 BlockCodeSize=4>
// CHECK-5-NEXT: <ReferenceBlock NumWords=3 BlockCodeSize=4>
// CHECK-5-NEXT: <Name abbrevid=5 op0=3/> blob data = 'int'
// CHECK-5-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-5-NEXT: </ReferenceBlock>
// CHECK-5-NEXT: <Name abbrevid=4 op0=1/> blob data = 'i'
// CHECK-5-NEXT: </MemberTypeBlock>
// CHECK-5-NEXT: </RecordBlock>
// RUN: llvm-bcanalyzer --dump %t/docs/bc/BD2BDEBD423F80BACCEA75DE6D6622D355FC2D17.bc | FileCheck %s --check-prefix CHECK-6
// CHECK-6: <BLOCKINFO_BLOCK/>
// CHECK-6-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-6-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-6-NEXT: </VersionBlock>
// CHECK-6-NEXT: <FunctionBlock NumWords=44 BlockCodeSize=4>
// CHECK-6-NEXT: <USR abbrevid=4 op0=20 op1=189 op2=43 op3=222 op4=189 op5=66 op6=63 op7=128 op8=186 op9=204 op10=234 op11=117 op12=222 op13=109 op14=102 op15=34 op16=211 op17=85 op18=252 op19=45 op20=23/>
// CHECK-6-NEXT: <Name abbrevid=5 op0=2/> blob data = '~E'
// CHECK-6-NEXT: <ReferenceBlock NumWords=10 BlockCodeSize=4>
// CHECK-6-NEXT: <USR abbrevid=4 op0=20 op1=40 op2=149 op3=132 op4=168 op5=224 op6=255 op7=65 op8=120 op9=167 op10=148 op11=98 op12=42 op13=84 op14=122 op15=166 op16=34 op17=80 op18=57 op19=103 op20=161/>
// CHECK-6-NEXT: <Name abbrevid=5 op0=1/> blob data = 'E'
// CHECK-6-NEXT: <RefType abbrevid=6 op0=2/>
// CHECK-6-NEXT: <Field abbrevid=7 op0=1/>
// CHECK-6-NEXT: </ReferenceBlock>
// CHECK-6-NEXT: <IsMethod abbrevid=9 op0=1/>
// CHECK-6-NEXT: <DefLocation abbrevid=6 op0=28 op1=4/> blob data = '{{.*}}'
// CHECK-6-NEXT: <ReferenceBlock NumWords=10 BlockCodeSize=4>
// CHECK-6-NEXT: <USR abbrevid=4 op0=20 op1=40 op2=149 op3=132 op4=168 op5=224 op6=255 op7=65 op8=120 op9=167 op10=148 op11=98 op12=42 op13=84 op14=122 op15=166 op16=34 op17=80 op18=57 op19=103 op20=161/>
// CHECK-6-NEXT: <Name abbrevid=5 op0=1/> blob data = 'E'
// CHECK-6-NEXT: <RefType abbrevid=6 op0=2/>
// CHECK-6-NEXT: <Field abbrevid=7 op0=2/>
// CHECK-6-NEXT: </ReferenceBlock>
// CHECK-6-NEXT: <TypeBlock NumWords=6 BlockCodeSize=4>
// CHECK-6-NEXT: <ReferenceBlock NumWords=3 BlockCodeSize=4>
// CHECK-6-NEXT: <Name abbrevid=5 op0=4/> blob data = 'void'
// CHECK-6-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-6-NEXT: </ReferenceBlock>
// CHECK-6-NEXT: </TypeBlock>
// CHECK-6-NEXT: </FunctionBlock>
// RUN: llvm-bcanalyzer --dump %t/docs/bc/DEB4AC1CD9253CD9EF7FBE6BCAC506D77984ABD4.bc | FileCheck %s --check-prefix CHECK-7
// CHECK-7: <BLOCKINFO_BLOCK/>
// CHECK-7-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-7-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-7-NEXT: </VersionBlock>
// CHECK-7-NEXT: <FunctionBlock NumWords=44 BlockCodeSize=4>
// CHECK-7-NEXT: <USR abbrevid=4 op0=20 op1=222 op2=180 op3=172 op4=28 op5=217 op6=37 op7=60 op8=217 op9=239 op10=127 op11=190 op12=107 op13=202 op14=197 op15=6 op16=215 op17=121 op18=132 op19=171 op20=212/>
// CHECK-7-NEXT: <Name abbrevid=5 op0=1/> blob data = 'E'
// CHECK-7-NEXT: <ReferenceBlock NumWords=10 BlockCodeSize=4>
// CHECK-7-NEXT: <USR abbrevid=4 op0=20 op1=40 op2=149 op3=132 op4=168 op5=224 op6=255 op7=65 op8=120 op9=167 op10=148 op11=98 op12=42 op13=84 op14=122 op15=166 op16=34 op17=80 op18=57 op19=103 op20=161/>
// CHECK-7-NEXT: <Name abbrevid=5 op0=1/> blob data = 'E'
// CHECK-7-NEXT: <RefType abbrevid=6 op0=2/>
// CHECK-7-NEXT: <Field abbrevid=7 op0=1/>
// CHECK-7-NEXT: </ReferenceBlock>
// CHECK-7-NEXT: <IsMethod abbrevid=9 op0=1/>
// CHECK-7-NEXT: <DefLocation abbrevid=6 op0=27 op1=4/> blob data = '{{.*}}'
// CHECK-7-NEXT: <ReferenceBlock NumWords=10 BlockCodeSize=4>
// CHECK-7-NEXT: <USR abbrevid=4 op0=20 op1=40 op2=149 op3=132 op4=168 op5=224 op6=255 op7=65 op8=120 op9=167 op10=148 op11=98 op12=42 op13=84 op14=122 op15=166 op16=34 op17=80 op18=57 op19=103 op20=161/>
// CHECK-7-NEXT: <Name abbrevid=5 op0=1/> blob data = 'E'
// CHECK-7-NEXT: <RefType abbrevid=6 op0=2/>
// CHECK-7-NEXT: <Field abbrevid=7 op0=2/>
// CHECK-7-NEXT: </ReferenceBlock>
// CHECK-7-NEXT: <TypeBlock NumWords=6 BlockCodeSize=4>
// CHECK-7-NEXT: <ReferenceBlock NumWords=3 BlockCodeSize=4>
// CHECK-7-NEXT: <Name abbrevid=5 op0=4/> blob data = 'void'
// CHECK-7-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-7-NEXT: </ReferenceBlock>
// CHECK-7-NEXT: </TypeBlock>
// CHECK-7-NEXT: </FunctionBlock>
// RUN: llvm-bcanalyzer --dump %t/docs/bc/641AB4A3D36399954ACDE29C7A8833032BF40472.bc | FileCheck %s --check-prefix CHECK-8
// CHECK-8: <BLOCKINFO_BLOCK/>
// CHECK-8-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-8-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-8-NEXT: </VersionBlock>
// CHECK-8-NEXT: <RecordBlock NumWords=24 BlockCodeSize=4>
// CHECK-8-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-8-NEXT: <Name abbrevid=5 op0=1/> blob data = 'Y'
// CHECK-8-NEXT: <ReferenceBlock NumWords=10 BlockCodeSize=4>
// CHECK-8-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-8-NEXT: <Name abbrevid=5 op0=1/> blob data = 'X'
// CHECK-8-NEXT: <RefType abbrevid=6 op0=2/>
// CHECK-8-NEXT: <Field abbrevid=7 op0=1/>
// CHECK-8-NEXT: </ReferenceBlock>
// CHECK-8-NEXT: <DefLocation abbrevid=6 op0=39 op1=4/> blob data = '{{.*}}'
// CHECK-8-NEXT: <TagType abbrevid=8 op0=3/>
// CHECK-8-NEXT: </RecordBlock>
// RUN: llvm-bcanalyzer --dump %t/docs/bc/FC07BD34D5E77782C263FA944447929EA8753740.bc | FileCheck %s --check-prefix CHECK-9
// CHECK-9: <BLOCKINFO_BLOCK/>
// CHECK-9-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-9-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-9-NEXT: </VersionBlock>
// CHECK-9-NEXT: <EnumBlock NumWords=16 BlockCodeSize=4>
// CHECK-9-NEXT: <USR abbrevid=4 op0=20 op1=252 op2=7 op3=189 op4=52 op5=213 op6=231 op7=119 op8=130 op9=194 op10=99 op11=250 op12=148 op13=68 op14=71 op15=146 op16=158 op17=168 op18=117 op19=55 op20=64/>
// CHECK-9-NEXT: <Name abbrevid=5 op0=1/> blob data = 'B'
// CHECK-9-NEXT: <DefLocation abbrevid=6 op0=17 op1=4/> blob data = '{{.*}}'
// CHECK-9-NEXT: <Member abbrevid=8 op0=1/> blob data = 'X'
// CHECK-9-NEXT: <Member abbrevid=8 op0=1/> blob data = 'Y'
// CHECK-9-NEXT: </EnumBlock>
// RUN: llvm-bcanalyzer --dump %t/docs/bc/0921737541208B8FA9BB42B60F78AC1D779AA054.bc | FileCheck %s --check-prefix CHECK-10
// CHECK-10: <BLOCKINFO_BLOCK/>
// CHECK-10-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-10-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-10-NEXT: </VersionBlock>
// CHECK-10-NEXT: <RecordBlock NumWords=12 BlockCodeSize=4>
// CHECK-10-NEXT: <USR abbrevid=4 op0=20 op1=9 op2=33 op3=115 op4=117 op5=65 op6=32 op7=139 op8=143 op9=169 op10=187 op11=66 op12=182 op13=15 op14=120 op15=172 op16=29 op17=119 op18=154 op19=160 op20=84/>
// CHECK-10-NEXT: <Name abbrevid=5 op0=1/> blob data = 'D'
// CHECK-10-NEXT: <DefLocation abbrevid=6 op0=23 op1=4/> blob data = '{{.*}}'
// CHECK-10-NEXT: <TagType abbrevid=8 op0=3/>
// CHECK-10-NEXT: </RecordBlock>
// RUN: llvm-bcanalyzer --dump %t/docs/bc/E3B54702FABFF4037025BA194FC27C47006330B5.bc | FileCheck %s --check-prefix CHECK-11
// CHECK-11: <BLOCKINFO_BLOCK/>
// CHECK-11-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-11-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-11-NEXT: </VersionBlock>
// CHECK-11-NEXT: <RecordBlock NumWords=37 BlockCodeSize=4>
// CHECK-11-NEXT: <USR abbrevid=4 op0=20 op1=227 op2=181 op3=71 op4=2 op5=250 op6=191 op7=244 op8=3 op9=112 op10=37 op11=186 op12=25 op13=79 op14=194 op15=124 op16=71 op17=0 op18=99 op19=48 op20=181/>
// CHECK-11-NEXT: <Name abbrevid=5 op0=1/> blob data = 'F'
// CHECK-11-NEXT: <DefLocation abbrevid=6 op0=36 op1=4/> blob data = '{{.*}}'
// CHECK-11-NEXT: <TagType abbrevid=8 op0=3/>
// CHECK-11-NEXT: <ReferenceBlock NumWords=10 BlockCodeSize=4>
// CHECK-11-NEXT: <USR abbrevid=4 op0=20 op1=40 op2=149 op3=132 op4=168 op5=224 op6=255 op7=65 op8=120 op9=167 op10=148 op11=98 op12=42 op13=84 op14=122 op15=166 op16=34 op17=80 op18=57 op19=103 op20=161/>
// CHECK-11-NEXT: <Name abbrevid=5 op0=1/> blob data = 'E'
// CHECK-11-NEXT: <RefType abbrevid=6 op0=2/>
// CHECK-11-NEXT: <Field abbrevid=7 op0=2/>
// CHECK-11-NEXT: </ReferenceBlock>
// CHECK-11-NEXT: <ReferenceBlock NumWords=10 BlockCodeSize=4>
// CHECK-11-NEXT: <USR abbrevid=4 op0=20 op1=9 op2=33 op3=115 op4=117 op5=65 op6=32 op7=139 op8=143 op9=169 op10=187 op11=66 op12=182 op13=15 op14=120 op15=172 op16=29 op17=119 op18=154 op19=160 op20=84/>
// CHECK-11-NEXT: <Name abbrevid=5 op0=1/> blob data = 'D'
// CHECK-11-NEXT: <RefType abbrevid=6 op0=2/>
// CHECK-11-NEXT: <Field abbrevid=7 op0=3/>
// CHECK-11-NEXT: </ReferenceBlock>
// CHECK-11-NEXT: </RecordBlock>
// RUN: llvm-bcanalyzer --dump %t/docs/bc/ACE81AFA6627B4CEF2B456FB6E1252925674AF7E.bc | FileCheck %s --check-prefix CHECK-12
// CHECK-12: <BLOCKINFO_BLOCK/>
// CHECK-12-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-12-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-12-NEXT: </VersionBlock>
// CHECK-12-NEXT: <RecordBlock NumWords=33 BlockCodeSize=4>
// CHECK-12-NEXT: <USR abbrevid=4 op0=20 op1=172 op2=232 op3=26 op4=250 op5=102 op6=39 op7=180 op8=206 op9=242 op10=180 op11=86 op12=251 op13=110 op14=18 op15=82 op16=146 op17=86 op18=116 op19=175 op20=126/>
// CHECK-12-NEXT: <Name abbrevid=5 op0=1/> blob data = 'A'
// CHECK-12-NEXT: <DefLocation abbrevid=6 op0=15 op1=4/> blob data = '{{.*}}'
// CHECK-12-NEXT: <TagType abbrevid=8 op0=2/>
// CHECK-12-NEXT: <MemberTypeBlock NumWords=8 BlockCodeSize=4>
// CHECK-12-NEXT: <ReferenceBlock NumWords=3 BlockCodeSize=4>
// CHECK-12-NEXT: <Name abbrevid=5 op0=3/> blob data = 'int'
// CHECK-12-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-12-NEXT: </ReferenceBlock>
// CHECK-12-NEXT: <Name abbrevid=4 op0=1/> blob data = 'X'
// CHECK-12-NEXT: </MemberTypeBlock>
// CHECK-12-NEXT: <MemberTypeBlock NumWords=8 BlockCodeSize=4>
// CHECK-12-NEXT: <ReferenceBlock NumWords=3 BlockCodeSize=4>
// CHECK-12-NEXT: <Name abbrevid=5 op0=3/> blob data = 'int'
// CHECK-12-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-12-NEXT: </ReferenceBlock>
// CHECK-12-NEXT: <Name abbrevid=4 op0=1/> blob data = 'Y'
// CHECK-12-NEXT: </MemberTypeBlock>
// CHECK-12-NEXT: </RecordBlock>
// RUN: llvm-bcanalyzer --dump %t/docs/bc/1E3438A08BA22025C0B46289FF0686F92C8924C5.bc | FileCheck %s --check-prefix CHECK-13
// CHECK-13: <BLOCKINFO_BLOCK/>
// CHECK-13-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-13-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-13-NEXT: </VersionBlock>
// CHECK-13-NEXT: <EnumBlock NumWords=16 BlockCodeSize=4>
// CHECK-13-NEXT: <USR abbrevid=4 op0=20 op1=30 op2=52 op3=56 op4=160 op5=139 op6=162 op7=32 op8=37 op9=192 op10=180 op11=98 op12=137 op13=255 op14=6 op15=134 op16=249 op17=44 op18=137 op19=36 op20=197/>
// CHECK-13-NEXT: <Name abbrevid=5 op0=2/> blob data = 'Bc'
// CHECK-13-NEXT: <DefLocation abbrevid=6 op0=19 op1=4/> blob data = '{{.*}}'
// CHECK-13-NEXT: <Scoped abbrevid=9 op0=1/>
// CHECK-13-NEXT: <Member abbrevid=8 op0=1/> blob data = 'A'
// CHECK-13-NEXT: <Member abbrevid=8 op0=1/> blob data = 'B'
// CHECK-13-NEXT: </EnumBlock>

View File

@ -1,25 +0,0 @@
// 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/06B5F6A19BA9F6A832E127C9968282B94619B210.bc --dump | FileCheck %s
struct C { int i; };
// CHECK: <BLOCKINFO_BLOCK/>
// CHECK-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-NEXT: </VersionBlock>
// CHECK-NEXT: <RecordBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <USR abbrevid=4 op0=20 op1=6 op2=181 op3=246 op4=161 op5=155 op6=169 op7=246 op8=168 op9=50 op10=225 op11=39 op12=201 op13=150 op14=130 op15=130 op16=185 op17=70 op18=25 op19=178 op20=16/>
// CHECK-NEXT: <Name abbrevid=5 op0=1/> blob data = 'C'
// CHECK-NEXT: <DefLocation abbrevid=6 op0=8 op1={{[0-9]*}}/> blob data = '{{.*}}'
// CHECK-NEXT: <MemberTypeBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Name abbrevid=5 op0=3/> blob data = 'int'
// CHECK-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-NEXT: </ReferenceBlock>
// CHECK-NEXT: <Name abbrevid=4 op0=1/> blob data = 'i'
// CHECK-NEXT: </MemberTypeBlock>
// CHECK-NEXT: </RecordBlock>

View File

@ -1,33 +0,0 @@
// 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/0B8A6B938B939B77C6325CCCC8AA3E938BF9E2E8.bc --dump | FileCheck %s
union D { int X; int Y; };
// CHECK: <BLOCKINFO_BLOCK/>
// CHECK-NEXT: <VersionBlock NumWords=1 BlockCodeSize=4>
// CHECK-NEXT: <Version abbrevid=4 op0=2/>
// CHECK-NEXT: </VersionBlock>
// CHECK-NEXT: <RecordBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <USR abbrevid=4 op0=20 op1=11 op2=138 op3=107 op4=147 op5=139 op6=147 op7=155 op8=119 op9=198 op10=50 op11=92 op12=204 op13=200 op14=170 op15=62 op16=147 op17=139 op18=249 op19=226 op20=232/>
// CHECK-NEXT: <Name abbrevid=5 op0=1/> blob data = 'D'
// CHECK-NEXT: <DefLocation abbrevid=6 op0=8 op1={{[0-9]*}}/> blob data = '{{.*}}'
// CHECK-NEXT: <TagType abbrevid=8 op0=2/>
// CHECK-NEXT: <MemberTypeBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Name abbrevid=5 op0=3/> blob data = 'int'
// CHECK-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-NEXT: </ReferenceBlock>
// CHECK-NEXT: <Name abbrevid=4 op0=1/> blob data = 'X'
// CHECK-NEXT: </MemberTypeBlock>
// CHECK-NEXT: <MemberTypeBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <ReferenceBlock NumWords={{[0-9]*}} BlockCodeSize=4>
// CHECK-NEXT: <Name abbrevid=5 op0=3/> blob data = 'int'
// CHECK-NEXT: <Field abbrevid=7 op0=4/>
// CHECK-NEXT: </ReferenceBlock>
// CHECK-NEXT: <Name abbrevid=4 op0=1/> blob data = 'Y'
// CHECK-NEXT: </MemberTypeBlock>
// CHECK-NEXT: </RecordBlock>

View File

@ -0,0 +1,28 @@
// THIS IS A GENERATED TEST. DO NOT EDIT.
// To regenerate, see clang-doc/gen_test.py docstring.
//
// RUN: rm -rf %t
// RUN: mkdir %t
// RUN: echo "" > %t/compile_flags.txt
// RUN: cp "%s" "%t/test.cpp"
/// \brief Brief description.
///
/// Extended description that
/// continues onto the next line.
///
/// <ul class="test">
/// <li> Testing.
/// </ul>
///
/// \verbatim
/// The description continues.
/// \endverbatim
/// --
/// \param [out] I is a parameter.
/// \param J is a parameter.
/// \return void
void F(int I, int J);
/// Bonus comment on definition
void F(int I, int J) {}

View File

@ -0,0 +1,26 @@
// THIS IS A GENERATED TEST. DO NOT EDIT.
// To regenerate, see clang-doc/gen_test.py docstring.
//
// RUN: rm -rf %t
// RUN: mkdir %t
// RUN: echo "" > %t/compile_flags.txt
// RUN: cp "%s" "%t/test.cpp"
namespace A {
void f();
} // namespace A
namespace A {
void f(){};
namespace B {
enum E { X };
E func(int i) { return X; }
} // namespace B
} // namespace A

View File

@ -0,0 +1,40 @@
// THIS IS A GENERATED TEST. DO NOT EDIT.
// To regenerate, see clang-doc/gen_test.py docstring.
//
// This test requires Linux due to system-dependent USR for the inner class.
// REQUIRES: system-linux
// RUN: rm -rf %t
// RUN: mkdir %t
// RUN: echo "" > %t/compile_flags.txt
// RUN: cp "%s" "%t/test.cpp"
void H() {
class I {};
}
union A { int X; int Y; };
enum B { X, Y };
enum class Bc { A, B };
struct C { int i; };
class D {};
class E {
public:
E() {}
~E() {}
protected:
void ProtectedMethod();
};
void E::ProtectedMethod() {}
class F : virtual private D, public E {};
class X {
class Y {};
};

View File

@ -0,0 +1,136 @@
// THIS IS A GENERATED TEST. DO NOT EDIT.
// To regenerate, see clang-doc/gen_test.py docstring.
//
// RUN: rm -rf %t
// RUN: mkdir %t
// RUN: echo "" > %t/compile_flags.txt
// RUN: cp "%s" "%t/test.cpp"
/// \brief Brief description.
///
/// Extended description that
/// continues onto the next line.
///
/// <ul class="test">
/// <li> Testing.
/// </ul>
///
/// \verbatim
/// The description continues.
/// \endverbatim
/// --
/// \param [out] I is a parameter.
/// \param J is a parameter.
/// \return void
void F(int I, int J);
/// Bonus comment on definition
void F(int I, int J) {}
// RUN: clang-doc --format=yaml --doxygen -p %t %t/test.cpp -output=%t/docs
// RUN: cat %t/docs/./F.yaml | FileCheck %s --check-prefix CHECK-0
// CHECK-0: ---
// CHECK-0-NEXT: USR: '7574630614A535710E5A6ABCFFF98BCA2D06A4CA'
// CHECK-0-NEXT: Name: 'F'
// CHECK-0-NEXT: Description:
// CHECK-0-NEXT: - Kind: 'FullComment'
// CHECK-0-NEXT: Children:
// CHECK-0-NEXT: - Kind: 'ParagraphComment'
// CHECK-0-NEXT: Children:
// CHECK-0-NEXT: - Kind: 'TextComment'
// CHECK-0-NEXT: - Kind: 'BlockCommandComment'
// CHECK-0-NEXT: Name: 'brief'
// CHECK-0-NEXT: Children:
// CHECK-0-NEXT: - Kind: 'ParagraphComment'
// CHECK-0-NEXT: Children:
// CHECK-0-NEXT: - Kind: 'TextComment'
// CHECK-0-NEXT: Text: ' Brief description.'
// CHECK-0-NEXT: - Kind: 'ParagraphComment'
// CHECK-0-NEXT: Children:
// CHECK-0-NEXT: - Kind: 'TextComment'
// CHECK-0-NEXT: Text: ' Extended description that'
// CHECK-0-NEXT: - Kind: 'TextComment'
// CHECK-0-NEXT: Text: ' continues onto the next line.'
// CHECK-0-NEXT: - Kind: 'ParagraphComment'
// CHECK-0-NEXT: Children:
// CHECK-0-NEXT: - Kind: 'TextComment'
// CHECK-0-NEXT: - Kind: 'HTMLStartTagComment'
// CHECK-0-NEXT: Name: 'ul'
// CHECK-0-NEXT: AttrKeys:
// CHECK-0-NEXT: - 'class'
// CHECK-0-NEXT: AttrValues:
// CHECK-0-NEXT: - 'test'
// CHECK-0-NEXT: - Kind: 'TextComment'
// CHECK-0-NEXT: - Kind: 'HTMLStartTagComment'
// CHECK-0-NEXT: Name: 'li'
// CHECK-0-NEXT: - Kind: 'TextComment'
// CHECK-0-NEXT: Text: ' Testing.'
// CHECK-0-NEXT: - Kind: 'TextComment'
// CHECK-0-NEXT: - Kind: 'HTMLEndTagComment'
// CHECK-0-NEXT: Name: 'ul'
// CHECK-0-NEXT: SelfClosing: true
// CHECK-0-NEXT: - Kind: 'ParagraphComment'
// CHECK-0-NEXT: Children:
// CHECK-0-NEXT: - Kind: 'TextComment'
// CHECK-0-NEXT: - Kind: 'VerbatimBlockComment'
// CHECK-0-NEXT: Name: 'verbatim'
// CHECK-0-NEXT: CloseName: 'endverbatim'
// CHECK-0-NEXT: Children:
// CHECK-0-NEXT: - Kind: 'VerbatimBlockLineComment'
// CHECK-0-NEXT: Text: ' The description continues.'
// CHECK-0-NEXT: - Kind: 'ParagraphComment'
// CHECK-0-NEXT: Children:
// CHECK-0-NEXT: - Kind: 'TextComment'
// CHECK-0-NEXT: Text: ' --'
// CHECK-0-NEXT: - Kind: 'TextComment'
// CHECK-0-NEXT: - Kind: 'ParamCommandComment'
// CHECK-0-NEXT: Direction: '[out]'
// CHECK-0-NEXT: ParamName: 'I'
// CHECK-0-NEXT: Explicit: true
// CHECK-0-NEXT: Children:
// CHECK-0-NEXT: - Kind: 'ParagraphComment'
// CHECK-0-NEXT: Children:
// CHECK-0-NEXT: - Kind: 'TextComment'
// CHECK-0-NEXT: Text: ' is a parameter.'
// CHECK-0-NEXT: - Kind: 'TextComment'
// CHECK-0-NEXT: - Kind: 'ParamCommandComment'
// CHECK-0-NEXT: Direction: '[in]'
// CHECK-0-NEXT: ParamName: 'J'
// CHECK-0-NEXT: Children:
// CHECK-0-NEXT: - Kind: 'ParagraphComment'
// CHECK-0-NEXT: Children:
// CHECK-0-NEXT: - Kind: 'TextComment'
// CHECK-0-NEXT: Text: ' is a parameter.'
// CHECK-0-NEXT: - Kind: 'TextComment'
// CHECK-0-NEXT: - Kind: 'BlockCommandComment'
// CHECK-0-NEXT: Name: 'return'
// CHECK-0-NEXT: Children:
// CHECK-0-NEXT: - Kind: 'ParagraphComment'
// CHECK-0-NEXT: Children:
// CHECK-0-NEXT: - Kind: 'TextComment'
// CHECK-0-NEXT: Text: ' void'
// CHECK-0-NEXT: - Kind: 'FullComment'
// CHECK-0-NEXT: Children:
// CHECK-0-NEXT: - Kind: 'ParagraphComment'
// CHECK-0-NEXT: Children:
// CHECK-0-NEXT: - Kind: 'TextComment'
// CHECK-0-NEXT: Text: ' Bonus comment on definition'
// CHECK-0-NEXT: DefLocation:
// CHECK-0-NEXT: LineNumber: 28
// CHECK-0-NEXT: Filename: 'test'
// CHECK-0-NEXT: Location:
// CHECK-0-NEXT: - LineNumber: 25
// CHECK-0-NEXT: Filename: 'test'
// CHECK-0-NEXT: Params:
// CHECK-0-NEXT: - Type:
// CHECK-0-NEXT: Name: 'int'
// CHECK-0-NEXT: Name: 'I'
// CHECK-0-NEXT: - Type:
// CHECK-0-NEXT: Name: 'int'
// CHECK-0-NEXT: Name: 'J'
// CHECK-0-NEXT: ReturnType:
// CHECK-0-NEXT: Type:
// CHECK-0-NEXT: Name: 'void'
// CHECK-0-NEXT: ...

View File

@ -1,129 +0,0 @@
// RUN: rm -rf %t
// RUN: mkdir %t
// RUN: echo "" > %t/compile_flags.txt
// RUN: cp "%s" "%t/test.cpp"
// RUN: clang-doc -doxygen -p %t %t/test.cpp -output=%t/docs
// RUN: cat %t/docs/F.yaml | FileCheck %s
/// \brief Brief description.
///
/// Extended description that
/// continues onto the next line.
///
/// <ul class="test">
/// <li> Testing.
/// </ul>
///
/// \verbatim
/// The description continues.
/// \endverbatim
///
/// \param [out] I is a parameter.
/// \param J is a parameter.
/// \return void
void F(int I, int J);
/// Bonus comment on definition
void F(int I, int J) {}
// CHECK: ---
// CHECK-NEXT: USR: '7574630614A535710E5A6ABCFFF98BCA2D06A4CA'
// CHECK-NEXT: Name: 'F'
// CHECK-NEXT: Description:
// CHECK-NEXT: - Kind: 'FullComment'
// CHECK-NEXT: Children:
// CHECK-NEXT: - Kind: 'ParagraphComment'
// CHECK-NEXT: Children:
// CHECK-NEXT: - Kind: 'TextComment'
// CHECK-NEXT: - Kind: 'BlockCommandComment'
// CHECK-NEXT: Name: 'brief'
// CHECK-NEXT: Children:
// CHECK-NEXT: - Kind: 'ParagraphComment'
// CHECK-NEXT: Children:
// CHECK-NEXT: - Kind: 'TextComment'
// CHECK-NEXT: Text: ' Brief description.'
// CHECK-NEXT: - Kind: 'ParagraphComment'
// CHECK-NEXT: Children:
// CHECK-NEXT: - Kind: 'TextComment'
// CHECK-NEXT: Text: ' Extended description that'
// CHECK-NEXT: - Kind: 'TextComment'
// CHECK-NEXT: Text: ' continues onto the next line.'
// CHECK-NEXT: - Kind: 'ParagraphComment'
// CHECK-NEXT: Children:
// CHECK-NEXT: - Kind: 'TextComment'
// CHECK-NEXT: - Kind: 'HTMLStartTagComment'
// CHECK-NEXT: Name: 'ul'
// CHECK-NEXT: AttrKeys:
// CHECK-NEXT: - 'class'
// CHECK-NEXT: AttrValues:
// CHECK-NEXT: - 'test'
// CHECK-NEXT: - Kind: 'TextComment'
// CHECK-NEXT: - Kind: 'HTMLStartTagComment'
// CHECK-NEXT: Name: 'li'
// CHECK-NEXT: - Kind: 'TextComment'
// CHECK-NEXT: Text: ' Testing.'
// CHECK-NEXT: - Kind: 'TextComment'
// CHECK-NEXT: - Kind: 'HTMLEndTagComment'
// CHECK-NEXT: Name: 'ul'
// CHECK-NEXT: SelfClosing: true
// CHECK-NEXT: - Kind: 'ParagraphComment'
// CHECK-NEXT: Children:
// CHECK-NEXT: - Kind: 'TextComment'
// CHECK-NEXT: - Kind: 'VerbatimBlockComment'
// CHECK-NEXT: Name: 'verbatim'
// CHECK-NEXT: CloseName: 'endverbatim'
// CHECK-NEXT: Children:
// CHECK-NEXT: - Kind: 'VerbatimBlockLineComment'
// CHECK-NEXT: Text: ' The description continues.'
// CHECK-NEXT: - Kind: 'ParagraphComment'
// CHECK-NEXT: Children:
// CHECK-NEXT: - Kind: 'TextComment'
// CHECK-NEXT: - Kind: 'ParamCommandComment'
// CHECK-NEXT: Direction: '[out]'
// CHECK-NEXT: ParamName: 'I'
// CHECK-NEXT: Explicit: true
// CHECK-NEXT: Children:
// CHECK-NEXT: - Kind: 'ParagraphComment'
// CHECK-NEXT: Children:
// CHECK-NEXT: - Kind: 'TextComment'
// CHECK-NEXT: Text: ' is a parameter.'
// CHECK-NEXT: - Kind: 'TextComment'
// CHECK-NEXT: - Kind: 'ParamCommandComment'
// CHECK-NEXT: Direction: '[in]'
// CHECK-NEXT: ParamName: 'J'
// CHECK-NEXT: Children:
// CHECK-NEXT: - Kind: 'ParagraphComment'
// CHECK-NEXT: Children:
// CHECK-NEXT: - Kind: 'TextComment'
// CHECK-NEXT: Text: ' is a parameter.'
// CHECK-NEXT: - Kind: 'TextComment'
// CHECK-NEXT: - Kind: 'BlockCommandComment'
// CHECK-NEXT: Name: 'return'
// CHECK-NEXT: Children:
// CHECK-NEXT: - Kind: 'ParagraphComment'
// CHECK-NEXT: Children:
// CHECK-NEXT: - Kind: 'TextComment'
// CHECK-NEXT: Text: ' void'
// CHECK-NEXT: - Kind: 'FullComment'
// CHECK-NEXT: Children:
// CHECK-NEXT: - Kind: 'ParagraphComment'
// CHECK-NEXT: Children:
// CHECK-NEXT: - Kind: 'TextComment'
// CHECK-NEXT: Text: ' Bonus comment on definition'
// CHECK-NEXT: DefLocation:
// CHECK-NEXT: LineNumber: 27
// CHECK-NEXT: Filename: '{{.*}}'
// CHECK-NEXT: Location:
// CHECK-NEXT: - LineNumber: 24
// CHECK-NEXT: Filename: '{{.*}}'
// CHECK-NEXT: Params:
// CHECK-NEXT: - Type:
// CHECK-NEXT: Name: 'int'
// CHECK-NEXT: Name: 'I'
// CHECK-NEXT: - Type:
// CHECK-NEXT: Name: 'int'
// CHECK-NEXT: Name: 'J'
// CHECK-NEXT: ReturnType:
// CHECK-NEXT: Type:
// CHECK-NEXT: Name: 'void'
// CHECK-NEXT: ...

View File

@ -1,22 +1,13 @@
// THIS IS A GENERATED TEST. DO NOT EDIT.
// To regenerate, see clang-doc/gen_test.py docstring.
//
// RUN: rm -rf %t
// RUN: mkdir %t
// RUN: echo "" > %t/compile_flags.txt
// RUN: cp "%s" "%t/test.cpp"
// RUN: clang-doc -doxygen -p %t %t/test.cpp -output=%t/docs
// RUN: cat %t/docs/A.yaml | FileCheck %s --check-prefix=CHECK-A
// RUN: cat %t/docs/A/B.yaml | FileCheck %s --check-prefix=CHECK-B
// RUN: cat %t/docs/A/f.yaml | FileCheck %s --check-prefix=CHECK-F
// RUN: cat %t/docs/A/B/E.yaml | FileCheck %s --check-prefix=CHECK-E
// RUN: cat %t/docs/A/B/func.yaml | FileCheck %s --check-prefix=CHECK-FUNC
namespace A {
// CHECK-A: ---
// CHECK-A-NEXT: USR: '8D042EFFC98B373450BC6B5B90A330C25A150E9C'
// CHECK-A-NEXT: Name: 'A'
// CHECK-A-NEXT: ...
void f();
} // namespace A
@ -25,78 +16,90 @@ namespace A {
void f(){};
// CHECK-F: ---
// CHECK-F-NEXT: USR: '39D3C95A5F7CE2BA4937BD7B01BAE09EBC2AD8AC'
// CHECK-F-NEXT: Name: 'f'
// CHECK-F-NEXT: Namespace:
// CHECK-F-NEXT: - Type: Namespace
// CHECK-F-NEXT: Name: 'A'
// CHECK-F-NEXT: USR: '8D042EFFC98B373450BC6B5B90A330C25A150E9C'
// CHECK-F-NEXT: DefLocation:
// CHECK-F-NEXT: LineNumber: 26
// CHECK-F-NEXT: Filename: '{{.*}}'
// CHECK-F-NEXT: Location:
// CHECK-F-NEXT: - LineNumber: 20
// CHECK-F-NEXT: Filename: 'test'
// CHECK-F-NEXT: ReturnType:
// CHECK-F-NEXT: Type:
// CHECK-F-NEXT: Name: 'void'
// CHECK-F-NEXT: ...
namespace B {
// CHECK-B: ---
// CHECK-B-NEXT: USR: 'E21AF79E2A9D02554BA090D10DF39FE273F5CDB5'
// CHECK-B-NEXT: Name: 'B'
// CHECK-B-NEXT: Namespace:
// CHECK-B-NEXT: - Type: Namespace
// CHECK-B-NEXT: Name: 'A'
// CHECK-B-NEXT: USR: '8D042EFFC98B373450BC6B5B90A330C25A150E9C'
// CHECK-B-NEXT: ...
enum E { X };
// CHECK-E: ---
// CHECK-E-NEXT: USR: 'E9ABF7E7E2425B626723D41E76E4BC7E7A5BD775'
// CHECK-E-NEXT: Name: 'E'
// CHECK-E-NEXT: Namespace:
// CHECK-E-NEXT: - Type: Namespace
// CHECK-E-NEXT: Name: 'B'
// CHECK-E-NEXT: USR: 'E21AF79E2A9D02554BA090D10DF39FE273F5CDB5'
// CHECK-E-NEXT: - Type: Namespace
// CHECK-E-NEXT: Name: 'A'
// CHECK-E-NEXT: USR: '8D042EFFC98B373450BC6B5B90A330C25A150E9C'
// CHECK-E-NEXT: DefLocation:
// CHECK-E-NEXT: LineNumber: 58
// CHECK-E-NEXT: Filename: '{{.*}}'
// CHECK-E-NEXT: Members:
// CHECK-E-NEXT: - 'X'
// CHECK-E-NEXT: ...
E func(int i) { return X; }
// CHECK-FUNC: ---
// CHECK-FUNC-NEXT: USR: '9A82CB33ED0FDF81EE383D31CD0957D153C5E840'
// CHECK-FUNC-NEXT: Name: 'func'
// CHECK-FUNC-NEXT: Namespace:
// CHECK-FUNC-NEXT: - Type: Namespace
// CHECK-FUNC-NEXT: Name: 'B'
// CHECK-FUNC-NEXT: USR: 'E21AF79E2A9D02554BA090D10DF39FE273F5CDB5'
// CHECK-FUNC-NEXT: - Type: Namespace
// CHECK-FUNC-NEXT: Name: 'A'
// CHECK-FUNC-NEXT: USR: '8D042EFFC98B373450BC6B5B90A330C25A150E9C'
// CHECK-FUNC-NEXT: DefLocation:
// CHECK-FUNC-NEXT: LineNumber: 77
// CHECK-FUNC-NEXT: Filename: '{{.*}}'
// CHECK-FUNC-NEXT: Params:
// CHECK-FUNC-NEXT: - Type:
// CHECK-FUNC-NEXT: Name: 'int'
// CHECK-FUNC-NEXT: Name: 'i'
// CHECK-FUNC-NEXT: ReturnType:
// CHECK-FUNC-NEXT: Type:
// CHECK-FUNC-NEXT: Name: 'enum A::B::E'
// CHECK-FUNC-NEXT: ...
} // namespace B
} // namespace A
// RUN: clang-doc --format=yaml --doxygen -p %t %t/test.cpp -output=%t/docs
// RUN: cat %t/docs/./A.yaml | FileCheck %s --check-prefix CHECK-0
// CHECK-0: ---
// CHECK-0-NEXT: USR: '8D042EFFC98B373450BC6B5B90A330C25A150E9C'
// CHECK-0-NEXT: Name: 'A'
// CHECK-0-NEXT: ...
// RUN: cat %t/docs/A/f.yaml | FileCheck %s --check-prefix CHECK-1
// CHECK-1: ---
// CHECK-1-NEXT: USR: '39D3C95A5F7CE2BA4937BD7B01BAE09EBC2AD8AC'
// CHECK-1-NEXT: Name: 'f'
// CHECK-1-NEXT: Namespace:
// CHECK-1-NEXT: - Type: Namespace
// CHECK-1-NEXT: Name: 'A'
// CHECK-1-NEXT: USR: '8D042EFFC98B373450BC6B5B90A330C25A150E9C'
// CHECK-1-NEXT: DefLocation:
// CHECK-1-NEXT: LineNumber: 17
// CHECK-1-NEXT: Filename: 'test'
// CHECK-1-NEXT: Location:
// CHECK-1-NEXT: - LineNumber: 11
// CHECK-1-NEXT: Filename: 'test'
// CHECK-1-NEXT: ReturnType:
// CHECK-1-NEXT: Type:
// CHECK-1-NEXT: Name: 'void'
// CHECK-1-NEXT: ...
// RUN: cat %t/docs/A/B.yaml | FileCheck %s --check-prefix CHECK-2
// CHECK-2: ---
// CHECK-2-NEXT: USR: 'E21AF79E2A9D02554BA090D10DF39FE273F5CDB5'
// CHECK-2-NEXT: Name: 'B'
// CHECK-2-NEXT: Namespace:
// CHECK-2-NEXT: - Type: Namespace
// CHECK-2-NEXT: Name: 'A'
// CHECK-2-NEXT: USR: '8D042EFFC98B373450BC6B5B90A330C25A150E9C'
// CHECK-2-NEXT: ...
// RUN: cat %t/docs/A/B/E.yaml | FileCheck %s --check-prefix CHECK-3
// CHECK-3: ---
// CHECK-3-NEXT: USR: 'E9ABF7E7E2425B626723D41E76E4BC7E7A5BD775'
// CHECK-3-NEXT: Name: 'E'
// CHECK-3-NEXT: Namespace:
// CHECK-3-NEXT: - Type: Namespace
// CHECK-3-NEXT: Name: 'B'
// CHECK-3-NEXT: USR: 'E21AF79E2A9D02554BA090D10DF39FE273F5CDB5'
// CHECK-3-NEXT: - Type: Namespace
// CHECK-3-NEXT: Name: 'A'
// CHECK-3-NEXT: USR: '8D042EFFC98B373450BC6B5B90A330C25A150E9C'
// CHECK-3-NEXT: DefLocation:
// CHECK-3-NEXT: LineNumber: 21
// CHECK-3-NEXT: Filename: 'test'
// CHECK-3-NEXT: Members:
// CHECK-3-NEXT: - 'X'
// CHECK-3-NEXT: ...
// RUN: cat %t/docs/A/B/func.yaml | FileCheck %s --check-prefix CHECK-4
// CHECK-4: ---
// CHECK-4-NEXT: USR: '9A82CB33ED0FDF81EE383D31CD0957D153C5E840'
// CHECK-4-NEXT: Name: 'func'
// CHECK-4-NEXT: Namespace:
// CHECK-4-NEXT: - Type: Namespace
// CHECK-4-NEXT: Name: 'B'
// CHECK-4-NEXT: USR: 'E21AF79E2A9D02554BA090D10DF39FE273F5CDB5'
// CHECK-4-NEXT: - Type: Namespace
// CHECK-4-NEXT: Name: 'A'
// CHECK-4-NEXT: USR: '8D042EFFC98B373450BC6B5B90A330C25A150E9C'
// CHECK-4-NEXT: DefLocation:
// CHECK-4-NEXT: LineNumber: 23
// CHECK-4-NEXT: Filename: 'test'
// CHECK-4-NEXT: Params:
// CHECK-4-NEXT: - Type:
// CHECK-4-NEXT: Name: 'int'
// CHECK-4-NEXT: Name: 'i'
// CHECK-4-NEXT: ReturnType:
// CHECK-4-NEXT: Type:
// CHECK-4-NEXT: Name: 'enum A::B::E'
// CHECK-4-NEXT: ...

View File

@ -1,250 +1,252 @@
// THIS IS A GENERATED TEST. DO NOT EDIT.
// To regenerate, see clang-doc/gen_test.py docstring.
//
// This test requires Linux due to system-dependent USR for the inner class.
// REQUIRES: system-linux
// RUN: rm -rf %t
// RUN: mkdir %t
// RUN: echo "" > %t/compile_flags.txt
// RUN: cp "%s" "%t/test.cpp"
// RUN: clang-doc -doxygen -p %t %t/test.cpp -output=%t/docs
// RUN: cat %t/docs/A.yaml | FileCheck %s --check-prefix=CHECK-A
// RUN: cat %t/docs/Bc.yaml | FileCheck %s --check-prefix=CHECK-BC
// RUN: cat %t/docs/B.yaml | FileCheck %s --check-prefix=CHECK-B
// RUN: cat %t/docs/C.yaml | FileCheck %s --check-prefix=CHECK-C
// RUN: cat %t/docs/D.yaml | FileCheck %s --check-prefix=CHECK-D
// RUN: cat %t/docs/E.yaml | FileCheck %s --check-prefix=CHECK-E
// RUN: cat %t/docs/E/ProtectedMethod.yaml | FileCheck %s --check-prefix=CHECK-EPM
// RUN: cat %t/docs/E/E.yaml | FileCheck %s --check-prefix=CHECK-ECON
// RUN: cat %t/docs/E/'~E.yaml' | FileCheck %s --check-prefix=CHECK-EDES
// RUN: cat %t/docs/F.yaml | FileCheck %s --check-prefix=CHECK-F
// RUN: cat %t/docs/X.yaml | FileCheck %s --check-prefix=CHECK-X
// RUN: cat %t/docs/X/Y.yaml | FileCheck %s --check-prefix=CHECK-Y
// RUN: cat %t/docs/H.yaml | FileCheck %s --check-prefix=CHECK-H
// RUN: cat %t/docs/H/I.yaml | FileCheck %s --check-prefix=CHECK-I
void H() {
class I {};
}
union A { int X; int Y; };
// CHECK-A: ---
// CHECK-A-NEXT: USR: 'ACE81AFA6627B4CEF2B456FB6E1252925674AF7E'
// CHECK-A-NEXT: Name: 'A'
// CHECK-A-NEXT: DefLocation:
// CHECK-A-NEXT: LineNumber: 21
// CHECK-A-NEXT: Filename: '{{.*}}'
// CHECK-A-NEXT: TagType: Union
// CHECK-A-NEXT: Members:
// CHECK-A-NEXT: - Type:
// CHECK-A-NEXT: Name: 'int'
// CHECK-A-NEXT: Name: 'X'
// CHECK-A-NEXT: - Type:
// CHECK-A-NEXT: Name: 'int'
// CHECK-A-NEXT: Name: 'Y'
// CHECK-A-NEXT: ...
enum B { X, Y };
// CHECK-B: ---
// CHECK-B-NEXT: USR: 'FC07BD34D5E77782C263FA944447929EA8753740'
// CHECK-B-NEXT: Name: 'B'
// CHECK-B-NEXT: DefLocation:
// CHECK-B-NEXT: LineNumber: 40
// CHECK-B-NEXT: Filename: '{{.*}}'
// CHECK-B-NEXT: Members:
// CHECK-B-NEXT: - 'X'
// CHECK-B-NEXT: - 'Y'
// CHECK-B-NEXT: ...
enum class Bc { A, B };
// CHECK-BC: ---
// CHECK-BC-NEXT: USR: '1E3438A08BA22025C0B46289FF0686F92C8924C5'
// CHECK-BC-NEXT: Name: 'Bc'
// CHECK-BC-NEXT: DefLocation:
// CHECK-BC-NEXT: LineNumber: 53
// CHECK-BC-NEXT: Filename: '{{.*}}'
// CHECK-BC-NEXT: Scoped: true
// CHECK-BC-NEXT: Members:
// CHECK-BC-NEXT: - 'A'
// CHECK-BC-NEXT: - 'B'
// CHECK-BC-NEXT: ...
struct C { int i; };
// CHECK-C: ---
// CHECK-C-NEXT: USR: '06B5F6A19BA9F6A832E127C9968282B94619B210'
// CHECK-C-NEXT: Name: 'C'
// CHECK-C-NEXT: DefLocation:
// CHECK-C-NEXT: LineNumber: 67
// CHECK-C-NEXT: Filename: '{{.*}}'
// CHECK-C-NEXT: Members:
// CHECK-C-NEXT: - Type:
// CHECK-C-NEXT: Name: 'int'
// CHECK-C-NEXT: Name: 'i'
// CHECK-C-NEXT: ...
class D {};
// CHECK-D: ---
// CHECK-D-NEXT: USR: '0921737541208B8FA9BB42B60F78AC1D779AA054'
// CHECK-D-NEXT: Name: 'D'
// CHECK-D-NEXT: DefLocation:
// CHECK-D-NEXT: LineNumber: 81
// CHECK-D-NEXT: Filename: '{{.*}}'
// CHECK-D-NEXT: TagType: Class
// CHECK-D-NEXT: ...
class E {
public:
E() {}
// CHECK-ECON: ---
// CHECK-ECON-NEXT: USR: 'DEB4AC1CD9253CD9EF7FBE6BCAC506D77984ABD4'
// CHECK-ECON-NEXT: Name: 'E'
// CHECK-ECON-NEXT: Namespace:
// CHECK-ECON-NEXT: - Type: Record
// CHECK-ECON-NEXT: Name: 'E'
// CHECK-ECON-NEXT: USR: '289584A8E0FF4178A794622A547AA622503967A1'
// CHECK-ECON-NEXT: DefLocation:
// CHECK-ECON-NEXT: LineNumber: 94
// CHECK-ECON-NEXT: Filename: '{{.*}}'
// CHECK-ECON-NEXT: IsMethod: true
// CHECK-ECON-NEXT: Parent:
// CHECK-ECON-NEXT: Type: Record
// CHECK-ECON-NEXT: Name: 'E'
// CHECK-ECON-NEXT: USR: '289584A8E0FF4178A794622A547AA622503967A1'
// CHECK-ECON-NEXT: ReturnType:
// CHECK-ECON-NEXT: Type:
// CHECK-ECON-NEXT: Name: 'void'
// CHECK-ECON-NEXT: ...
~E() {}
// CHECK-EDES: ---
// CHECK-EDES-NEXT: USR: 'BD2BDEBD423F80BACCEA75DE6D6622D355FC2D17'
// CHECK-EDES-NEXT: Name: '~E'
// CHECK-EDES-NEXT: Namespace:
// CHECK-EDES-NEXT: - Type: Record
// CHECK-EDES-NEXT: Name: 'E'
// CHECK-EDES-NEXT: USR: '289584A8E0FF4178A794622A547AA622503967A1'
// CHECK-EDES-NEXT: DefLocation:
// CHECK-EDES-NEXT: LineNumber: 116
// CHECK-EDES-NEXT: Filename: '{{.*}}'
// CHECK-EDES-NEXT: IsMethod: true
// CHECK-EDES-NEXT: Parent:
// CHECK-EDES-NEXT: Type: Record
// CHECK-EDES-NEXT: Name: 'E'
// CHECK-EDES-NEXT: USR: '289584A8E0FF4178A794622A547AA622503967A1'
// CHECK-EDES-NEXT: ReturnType:
// CHECK-EDES-NEXT: Type:
// CHECK-EDES-NEXT: Name: 'void'
// CHECK-EDES-NEXT: ...
protected:
void ProtectedMethod();
};
// CHECK-E: ---
// CHECK-E-NEXT: USR: '289584A8E0FF4178A794622A547AA622503967A1'
// CHECK-E-NEXT: Name: 'E'
// CHECK-E-NEXT: DefLocation:
// CHECK-E-NEXT: LineNumber: 92
// CHECK-E-NEXT: Filename: '{{.*}}'
// CHECK-E-NEXT: TagType: Class
// CHECK-E-NEXT: ...
void E::ProtectedMethod() {}
// CHECK-EPM: ---
// CHECK-EPM-NEXT: USR: '5093D428CDC62096A67547BA52566E4FB9404EEE'
// CHECK-EPM-NEXT: Name: 'ProtectedMethod'
// CHECK-EPM-NEXT: Namespace:
// CHECK-EPM-NEXT: - Type: Record
// CHECK-EPM-NEXT: Name: 'E'
// CHECK-EPM-NEXT: USR: '289584A8E0FF4178A794622A547AA622503967A1'
// CHECK-EPM-NEXT: DefLocation:
// CHECK-EPM-NEXT: LineNumber: 152
// CHECK-EPM-NEXT: Filename: '{{.*}}'
// CHECK-EPM-NEXT: Location:
// CHECK-EPM-NEXT: - LineNumber: 140
// CHECK-EPM-NEXT: Filename: '{{.*}}'
// CHECK-EPM-NEXT: IsMethod: true
// CHECK-EPM-NEXT: Parent:
// CHECK-EPM-NEXT: Type: Record
// CHECK-EPM-NEXT: Name: 'E'
// CHECK-EPM-NEXT: USR: '289584A8E0FF4178A794622A547AA622503967A1'
// CHECK-EPM-NEXT: ReturnType:
// CHECK-EPM-NEXT: Type:
// CHECK-EPM-NEXT: Name: 'void'
// CHECK-EPM-NEXT: ...
class F : virtual private D, public E {};
// CHECK-F: ---
// CHECK-F-NEXT: USR: 'E3B54702FABFF4037025BA194FC27C47006330B5'
// CHECK-F-NEXT: Name: 'F'
// CHECK-F-NEXT: DefLocation:
// CHECK-F-NEXT: LineNumber: 177
// CHECK-F-NEXT: Filename: '{{.*}}'
// CHECK-F-NEXT: TagType: Class
// CHECK-F-NEXT: Parents:
// CHECK-F-NEXT: - Type: Record
// CHECK-F-NEXT: Name: 'E'
// CHECK-F-NEXT: USR: '289584A8E0FF4178A794622A547AA622503967A1'
// CHECK-F-NEXT: VirtualParents:
// CHECK-F-NEXT: - Type: Record
// CHECK-F-NEXT: Name: 'D'
// CHECK-F-NEXT: USR: '0921737541208B8FA9BB42B60F78AC1D779AA054'
// CHECK-F-NEXT: ...
class X {
class Y {};
// CHECK-Y: ---
// CHECK-Y-NEXT: USR: '641AB4A3D36399954ACDE29C7A8833032BF40472'
// CHECK-Y-NEXT: Name: 'Y'
// CHECK-Y-NEXT: Namespace:
// CHECK-Y-NEXT: - Type: Record
// CHECK-Y-NEXT: Name: 'X'
// CHECK-Y-NEXT: USR: 'CA7C7935730B5EACD25F080E9C83FA087CCDC75E'
// CHECK-Y-NEXT: DefLocation:
// CHECK-Y-NEXT: LineNumber: 197
// CHECK-Y-NEXT: Filename: '{{.*}}'
// CHECK-Y-NEXT: TagType: Class
// CHECK-Y-NEXT: ...
};
// CHECK-X: ---
// CHECK-X-NEXT: USR: 'CA7C7935730B5EACD25F080E9C83FA087CCDC75E'
// CHECK-X-NEXT: Name: 'X'
// CHECK-X-NEXT: DefLocation:
// CHECK-X-NEXT: LineNumber: 196
// CHECK-X-NEXT: Filename: '{{.*}}'
// CHECK-X-NEXT: TagType: Class
// CHECK-X-NEXT: ...
// RUN: clang-doc --format=yaml --doxygen -p %t %t/test.cpp -output=%t/docs
void H() {
class I {};
// CHECK-I: ---
// CHECK-I-NEXT: USR: '{{.*}}'
// CHECK-I-NEXT: Name: 'I'
// CHECK-I-NEXT: Namespace:
// CHECK-I-NEXT: - Type: Function
// CHECK-I-NEXT: Name: 'H'
// CHECK-I-NEXT: USR: 'B6AC4C5C9F2EA3F2B3ECE1A33D349F4EE502B24E'
// CHECK-I-NEXT: DefLocation:
// CHECK-I-NEXT: LineNumber: 224
// CHECK-I-NEXT: Filename: 'test'
// CHECK-I-NEXT: TagType: Class
// CHECK-I-NEXT: ...
}
// RUN: cat %t/docs/./C.yaml | FileCheck %s --check-prefix CHECK-0
// CHECK-0: ---
// CHECK-0-NEXT: USR: '06B5F6A19BA9F6A832E127C9968282B94619B210'
// CHECK-0-NEXT: Name: 'C'
// CHECK-0-NEXT: DefLocation:
// CHECK-0-NEXT: LineNumber: 21
// CHECK-0-NEXT: Filename: 'test'
// CHECK-0-NEXT: Members:
// CHECK-0-NEXT: - Type:
// CHECK-0-NEXT: Name: 'int'
// CHECK-0-NEXT: Name: 'i'
// CHECK-0-NEXT: ...
// CHECK-H: ---
// CHECK-H-NEXT: USR: 'B6AC4C5C9F2EA3F2B3ECE1A33D349F4EE502B24E'
// CHECK-H-NEXT: Name: 'H'
// CHECK-H-NEXT: DefLocation:
// CHECK-H-NEXT: LineNumber: 223
// CHECK-H-NEXT: Filename: 'test'
// CHECK-H-NEXT: ReturnType:
// CHECK-H-NEXT: Type:
// CHECK-H-NEXT: Name: 'void'
// CHECK-H-NEXT: ...
// RUN: cat %t/docs/./A.yaml | FileCheck %s --check-prefix CHECK-1
// CHECK-1: ---
// CHECK-1-NEXT: USR: 'ACE81AFA6627B4CEF2B456FB6E1252925674AF7E'
// CHECK-1-NEXT: Name: 'A'
// CHECK-1-NEXT: DefLocation:
// CHECK-1-NEXT: LineNumber: 15
// CHECK-1-NEXT: Filename: 'test'
// CHECK-1-NEXT: TagType: Union
// CHECK-1-NEXT: Members:
// CHECK-1-NEXT: - Type:
// CHECK-1-NEXT: Name: 'int'
// CHECK-1-NEXT: Name: 'X'
// CHECK-1-NEXT: - Type:
// CHECK-1-NEXT: Name: 'int'
// CHECK-1-NEXT: Name: 'Y'
// CHECK-1-NEXT: ...
// RUN: cat %t/docs/./F.yaml | FileCheck %s --check-prefix CHECK-2
// CHECK-2: ---
// CHECK-2-NEXT: USR: 'E3B54702FABFF4037025BA194FC27C47006330B5'
// CHECK-2-NEXT: Name: 'F'
// CHECK-2-NEXT: DefLocation:
// CHECK-2-NEXT: LineNumber: 36
// CHECK-2-NEXT: Filename: 'test'
// CHECK-2-NEXT: TagType: Class
// CHECK-2-NEXT: Parents:
// CHECK-2-NEXT: - Type: Record
// CHECK-2-NEXT: Name: 'E'
// CHECK-2-NEXT: USR: '289584A8E0FF4178A794622A547AA622503967A1'
// CHECK-2-NEXT: VirtualParents:
// CHECK-2-NEXT: - Type: Record
// CHECK-2-NEXT: Name: 'D'
// CHECK-2-NEXT: USR: '0921737541208B8FA9BB42B60F78AC1D779AA054'
// CHECK-2-NEXT: ...
// RUN: cat %t/docs/./E.yaml | FileCheck %s --check-prefix CHECK-3
// CHECK-3: ---
// CHECK-3-NEXT: USR: '289584A8E0FF4178A794622A547AA622503967A1'
// CHECK-3-NEXT: Name: 'E'
// CHECK-3-NEXT: DefLocation:
// CHECK-3-NEXT: LineNumber: 25
// CHECK-3-NEXT: Filename: 'test'
// CHECK-3-NEXT: TagType: Class
// CHECK-3-NEXT: ...
// RUN: cat %t/docs/./D.yaml | FileCheck %s --check-prefix CHECK-4
// CHECK-4: ---
// CHECK-4-NEXT: USR: '0921737541208B8FA9BB42B60F78AC1D779AA054'
// CHECK-4-NEXT: Name: 'D'
// CHECK-4-NEXT: DefLocation:
// CHECK-4-NEXT: LineNumber: 23
// CHECK-4-NEXT: Filename: 'test'
// CHECK-4-NEXT: TagType: Class
// CHECK-4-NEXT: ...
// RUN: cat %t/docs/./B.yaml | FileCheck %s --check-prefix CHECK-5
// CHECK-5: ---
// CHECK-5-NEXT: USR: 'FC07BD34D5E77782C263FA944447929EA8753740'
// CHECK-5-NEXT: Name: 'B'
// CHECK-5-NEXT: DefLocation:
// CHECK-5-NEXT: LineNumber: 17
// CHECK-5-NEXT: Filename: 'test'
// CHECK-5-NEXT: Members:
// CHECK-5-NEXT: - 'X'
// CHECK-5-NEXT: - 'Y'
// CHECK-5-NEXT: ...
// RUN: cat %t/docs/./X.yaml | FileCheck %s --check-prefix CHECK-6
// CHECK-6: ---
// CHECK-6-NEXT: USR: 'CA7C7935730B5EACD25F080E9C83FA087CCDC75E'
// CHECK-6-NEXT: Name: 'X'
// CHECK-6-NEXT: DefLocation:
// CHECK-6-NEXT: LineNumber: 38
// CHECK-6-NEXT: Filename: 'test'
// CHECK-6-NEXT: TagType: Class
// CHECK-6-NEXT: ...
// RUN: cat %t/docs/./H.yaml | FileCheck %s --check-prefix CHECK-7
// CHECK-7: ---
// CHECK-7-NEXT: USR: 'B6AC4C5C9F2EA3F2B3ECE1A33D349F4EE502B24E'
// CHECK-7-NEXT: Name: 'H'
// CHECK-7-NEXT: DefLocation:
// CHECK-7-NEXT: LineNumber: 11
// CHECK-7-NEXT: Filename: 'test'
// CHECK-7-NEXT: ReturnType:
// CHECK-7-NEXT: Type:
// CHECK-7-NEXT: Name: 'void'
// CHECK-7-NEXT: ...
// RUN: cat %t/docs/./Bc.yaml | FileCheck %s --check-prefix CHECK-8
// CHECK-8: ---
// CHECK-8-NEXT: USR: '1E3438A08BA22025C0B46289FF0686F92C8924C5'
// CHECK-8-NEXT: Name: 'Bc'
// CHECK-8-NEXT: DefLocation:
// CHECK-8-NEXT: LineNumber: 19
// CHECK-8-NEXT: Filename: 'test'
// CHECK-8-NEXT: Scoped: true
// CHECK-8-NEXT: Members:
// CHECK-8-NEXT: - 'A'
// CHECK-8-NEXT: - 'B'
// CHECK-8-NEXT: ...
// RUN: cat %t/docs/H/I.yaml | FileCheck %s --check-prefix CHECK-9
// CHECK-9: ---
// CHECK-9-NEXT: USR: '3FB542274573CAEAD54CEBFFCAEE3D77FB9713D8'
// CHECK-9-NEXT: Name: 'I'
// CHECK-9-NEXT: Namespace:
// CHECK-9-NEXT: - Type: Function
// CHECK-9-NEXT: Name: 'H'
// CHECK-9-NEXT: USR: 'B6AC4C5C9F2EA3F2B3ECE1A33D349F4EE502B24E'
// CHECK-9-NEXT: DefLocation:
// CHECK-9-NEXT: LineNumber: 12
// CHECK-9-NEXT: Filename: 'test'
// CHECK-9-NEXT: TagType: Class
// CHECK-9-NEXT: ...
// RUN: cat %t/docs/X/Y.yaml | FileCheck %s --check-prefix CHECK-10
// CHECK-10: ---
// CHECK-10-NEXT: USR: '641AB4A3D36399954ACDE29C7A8833032BF40472'
// CHECK-10-NEXT: Name: 'Y'
// CHECK-10-NEXT: Namespace:
// CHECK-10-NEXT: - Type: Record
// CHECK-10-NEXT: Name: 'X'
// CHECK-10-NEXT: USR: 'CA7C7935730B5EACD25F080E9C83FA087CCDC75E'
// CHECK-10-NEXT: DefLocation:
// CHECK-10-NEXT: LineNumber: 39
// CHECK-10-NEXT: Filename: 'test'
// CHECK-10-NEXT: TagType: Class
// CHECK-10-NEXT: ...
// RUN: cat %t/docs/E/ProtectedMethod.yaml | FileCheck %s --check-prefix CHECK-11
// CHECK-11: ---
// CHECK-11-NEXT: USR: '5093D428CDC62096A67547BA52566E4FB9404EEE'
// CHECK-11-NEXT: Name: 'ProtectedMethod'
// CHECK-11-NEXT: Namespace:
// CHECK-11-NEXT: - Type: Record
// CHECK-11-NEXT: Name: 'E'
// CHECK-11-NEXT: USR: '289584A8E0FF4178A794622A547AA622503967A1'
// CHECK-11-NEXT: DefLocation:
// CHECK-11-NEXT: LineNumber: 34
// CHECK-11-NEXT: Filename: 'test'
// CHECK-11-NEXT: Location:
// CHECK-11-NEXT: - LineNumber: 31
// CHECK-11-NEXT: Filename: 'test'
// CHECK-11-NEXT: IsMethod: true
// CHECK-11-NEXT: Parent:
// CHECK-11-NEXT: Type: Record
// CHECK-11-NEXT: Name: 'E'
// CHECK-11-NEXT: USR: '289584A8E0FF4178A794622A547AA622503967A1'
// CHECK-11-NEXT: ReturnType:
// CHECK-11-NEXT: Type:
// CHECK-11-NEXT: Name: 'void'
// CHECK-11-NEXT: ...
// RUN: cat %t/docs/E/E.yaml | FileCheck %s --check-prefix CHECK-12
// CHECK-12: ---
// CHECK-12-NEXT: USR: 'DEB4AC1CD9253CD9EF7FBE6BCAC506D77984ABD4'
// CHECK-12-NEXT: Name: 'E'
// CHECK-12-NEXT: Namespace:
// CHECK-12-NEXT: - Type: Record
// CHECK-12-NEXT: Name: 'E'
// CHECK-12-NEXT: USR: '289584A8E0FF4178A794622A547AA622503967A1'
// CHECK-12-NEXT: DefLocation:
// CHECK-12-NEXT: LineNumber: 27
// CHECK-12-NEXT: Filename: 'test'
// CHECK-12-NEXT: IsMethod: true
// CHECK-12-NEXT: Parent:
// CHECK-12-NEXT: Type: Record
// CHECK-12-NEXT: Name: 'E'
// CHECK-12-NEXT: USR: '289584A8E0FF4178A794622A547AA622503967A1'
// CHECK-12-NEXT: ReturnType:
// CHECK-12-NEXT: Type:
// CHECK-12-NEXT: Name: 'void'
// CHECK-12-NEXT: ...
// RUN: cat %t/docs/E/~E.yaml | FileCheck %s --check-prefix CHECK-13
// CHECK-13: ---
// CHECK-13-NEXT: USR: 'BD2BDEBD423F80BACCEA75DE6D6622D355FC2D17'
// CHECK-13-NEXT: Name: '~E'
// CHECK-13-NEXT: Namespace:
// CHECK-13-NEXT: - Type: Record
// CHECK-13-NEXT: Name: 'E'
// CHECK-13-NEXT: USR: '289584A8E0FF4178A794622A547AA622503967A1'
// CHECK-13-NEXT: DefLocation:
// CHECK-13-NEXT: LineNumber: 28
// CHECK-13-NEXT: Filename: 'test'
// CHECK-13-NEXT: IsMethod: true
// CHECK-13-NEXT: Parent:
// CHECK-13-NEXT: Type: Record
// CHECK-13-NEXT: Name: 'E'
// CHECK-13-NEXT: USR: '289584A8E0FF4178A794622A547AA622503967A1'
// CHECK-13-NEXT: ReturnType:
// CHECK-13-NEXT: Type:
// CHECK-13-NEXT: Name: 'void'
// CHECK-13-NEXT: ...