Files
clang-p2996/clang/test/APINotes/templates.cpp
Egor Zhdan 7344e991ad [APINotes] Add test for C++ class templates
This upstreams https://github.com/apple/llvm-project/pull/7930.

This adds a test to verify that we can apply attributes to C++ class
templates using API Notes. Doing the same for function templates is not
currently possible and requires more work.
2024-03-29 13:05:12 +00:00

10 lines
718 B
C++

// RUN: rm -rf %t && mkdir -p %t
// 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++
// 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 -ast-dump -ast-dump-filter Box -x c++ | FileCheck -check-prefix=CHECK-BOX %s
#include "Templates.h"
// CHECK-BOX: Dumping Box:
// CHECK-BOX-NEXT: ClassTemplateDecl {{.+}} imported in Templates Box
// CHECK-BOX: SwiftAttrAttr {{.+}} <<invalid sloc>> "import_owned"