25 lines · cpp
1// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -o - -O1 -relaxed-aliasing -fsanitize=thread -disable-llvm-optzns %s | \2// RUN: FileCheck %s3// RUN: %clang_cc1 -triple x86_64-apple-darwin -new-struct-path-tbaa \4// RUN: -emit-llvm -o - -O1 -relaxed-aliasing -fsanitize=thread -disable-llvm-optzns %s | \5// RUN: FileCheck %s6//7// Check that we do not create tbaa for instructions generated for copies.8 9// CHECK-NOT: !tbaa10 11struct A {12 short s;13 int i;14 char c;15 int j;16};17 18void copyStruct(A *a1, A *a2) {19 *a1 = *a2;20}21 22void copyInt(int *a, int *b) {23 *a = *b;24}25