llvm-project/llvm/test/TableGen/anonymous-location.td
Rahul Joshi 876f661dbe
[LIT] Rename substitution %basename_s to %{s:basename} (#111062)
Also added `%{t:stem}` as an alias for `%basename_t` and modified unit
test to test these new substitutions.
2024-10-03 18:18:10 -07:00

17 lines
486 B
TableGen

// RUN: llvm-tblgen --print-detailed-records %s | FileCheck %s -DFILE=%{s:basename}
class A<int a> {
int Num = a;
}
// Verify that the location of the anonymous record instantiated
// for A<10> and A<11> is correct. It should show the line where the
// anonymous record was instantiated and not the line where the class
// was defined.
def y {
// CHECK: anonymous_0 |[[FILE]]:[[@LINE+1]]|
int x = A<10>.Num;
// CHECK: anonymous_1 |[[FILE]]:[[@LINE+1]]|
int y = A<11>.Num;
}