llvm-project/clang/test/Driver/check-time-trace-ParseDeclarationOrFunctionDefinition.cpp
Aiden Grossman b7b501e54c Reapply "[clang] Remove %T from tests (#151614)"
This reverts commit 4c80193a58a5c24e2bbebe291feb406191c4e2ab.

This relands the commit. The issues have theoretically been fixed.
2025-08-02 20:08:53 +00:00

17 lines
753 B
C++

// RUN: mkdir -p %t.dir
// RUN: %clangxx -S -ftime-trace -ftime-trace-granularity=0 -o %t.dir/check-time-trace-ParseDeclarationOrFunctionDefinition %s
// RUN: cat %t.dir/check-time-trace-ParseDeclarationOrFunctionDefinition.json \
// RUN: | %python -c 'import json, sys; json.dump(json.loads(sys.stdin.read()), sys.stdout, sort_keys=True, indent=2)' \
// RUN: | FileCheck %s
// CHECK-DAG: "name": "ParseDeclarationOrFunctionDefinition"
// CHECK-DAG: "detail": "{{.*}}check-time-trace-ParseDeclarationOrFunctionDefinition.cpp:16:1"
// CHECK-DAG: "name": "ParseFunctionDefinition"
// CHECK-DAG: "detail": "foo"
// CHECK-DAG: "name": "ParseFunctionDefinition"
// CHECK-DAG: "detail": "bar"
template <typename T>
void foo(T) {}
void bar() { foo(0); }