brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 37bfee4 Raw
43 lines · cpp
1// Test dedup_token_length2// Fails with debug checks: https://bugs.llvm.org/show_bug.cgi?id=468603// XFAIL: !compiler-rt-optimized && tsan4// RUN: %clangxx -O0 %s -o %t5// RUN: env %tool_options='abort_on_error=0'                       not %run %t 2>&1   | FileCheck %s --check-prefix=CHECK0 --match-full-lines6// RUN: env %tool_options='abort_on_error=0, dedup_token_length=0' not %run %t 2>&1   | FileCheck %s --check-prefix=CHECK0 --match-full-lines7// RUN: env %tool_options='abort_on_error=0, dedup_token_length=1' not %run %t 2>&1   | FileCheck %s --check-prefix=CHECK1 --match-full-lines8// RUN: env %tool_options='abort_on_error=0, dedup_token_length=2' not %run %t 2>&1   | FileCheck %s --check-prefix=CHECK2 --match-full-lines9// RUN: env %tool_options='abort_on_error=0, dedup_token_length=3' not %run %t 2>&1   | FileCheck %s --check-prefix=CHECK3 --match-full-lines10 11// REQUIRES: stable-runtime12 13// rdar://158303080 top few frames are at times inaccurate in ubsan fast stack14// unwind on darwin15// XFAIL: (darwin && ubsan && (arm64-target-arch || arm64e-target-arch))16 17// XFAIL: target={{.*netbsd.*}} && !asan18 19volatile int *null = 0;20 21namespace Xyz {22  template<class A, class B> void Abc() {23    *null = 0;24  }25}26 27extern "C" void bar() {28  Xyz::Abc<int, int>();29}30 31void FOO() {32  bar();33}34 35int main(int argc, char **argv) {36  FOO();37}38 39// CHECK0-NOT: DEDUP_TOKEN:40// CHECK1: DEDUP_TOKEN: void Xyz::Abc<int, int>()41// CHECK2: DEDUP_TOKEN: void Xyz::Abc<int, int>()--bar42// CHECK3: DEDUP_TOKEN: void Xyz::Abc<int, int>()--bar--FOO()43