xref: /llvm-project/clang/test/CodeGenCXX/annotate-type.cpp (revision 7c1d9b15eee3a34678addab2bab66f3020ac0753)
1 // RUN: %clang_cc1 -triple %itanium_abi_triple-only %s -emit-llvm -o - | FileCheck %s
2 
3 // Test that `annotate_type` does not affect mangled names.
4 
f(int *,int)5 int *[[clang::annotate_type("foo")]] f(int *[[clang::annotate_type("foo")]],
6                                        int [[clang::annotate_type("foo")]]) {
7   return nullptr;
8 }
9 // CHECK: @_Z1fPii
10 
11 template <class T> struct S {};
12 
13 S<int *[[clang::annotate_type("foo")]]>
g(S<int * >)14 g(S<int *[[clang::annotate_type("foo")]]>) {
15   return {};
16 }
17 // CHECK: @_Z1g1SIPiE
18