xref: /llvm-project/clang/test/AST/ast-crash-doc.cpp (revision 557e32e002edd2a5a9e728d96b098bffa33e34d0)
1 // RUN: rm -rf %t
2 // RUN: split-file %s %t
3 
4 // RUN: %clang_cc1 -emit-module -x c++ -fmodules -I %t/Inputs -fmodule-name=aa %t/Inputs/module.modulemap -o %t/aa.pcm
5 // RUN: rm %t/Inputs/b.h
6 // RUN: not %clang_cc1 -x c++ -Wdocumentation -ast-dump-all -fmodules -I %t/Inputs -fmodule-file=%t/aa.pcm %t/test.cpp | FileCheck %s
7 
8 //--- Inputs/module.modulemap
9 module aa {
10     header "a.h"
11     header "b.h"
12 }
13 
14 //--- Inputs/a.h
15 // empty file
16 
17 //--- Inputs/b.h
18 /// test foo @return
19 int foo();
20 
21 
22 //--- test.cpp
23 #include "a.h"
24 
25 /// test comment at the primary file
26 
27 int a = foo();
28 
29 
30 // CHECK: TranslationUnitDecl
31