xref: /llvm-project/clang/test/APINotes/templates.cpp (revision feb787244e54fe5abe5a96fefc4c74019f21a0ff)
1 // RUN: rm -rf %t && mkdir -p %t
2 // RUN: %clang_cc1 -fmodules -fblocks -fimplicit-module-maps -fmodules-cache-path=%t/ModulesCache/Tmpl -fdisable-module-hash -fapinotes-modules -fsyntax-only -I %S/Inputs/Headers -F %S/Inputs/Frameworks %s -x c++
3 // RUN: %clang_cc1 -fmodules -fblocks -fimplicit-module-maps -fmodules-cache-path=%t/ModulesCache/Tmpl -fdisable-module-hash -fapinotes-modules -I %S/Inputs/Headers -F %S/Inputs/Frameworks %s -ast-dump -ast-dump-filter Box -x c++ | FileCheck -check-prefix=CHECK-BOX %s
4 
5 #include "Templates.h"
6 
7 // CHECK-BOX: Dumping Box:
8 // CHECK-BOX-NEXT: ClassTemplateDecl {{.+}} imported in Templates Box
9 // CHECK-BOX: SwiftAttrAttr {{.+}} <<invalid sloc>> "import_owned"
10 
11 // Make sure the attributes aren't duplicated.
12 // CHECK-BOX-NOT: SwiftAttrAttr {{.+}} <<invalid sloc>> "import_owned"
13