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.
10 lines
718 B
C++
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"
|