summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/tbaa-thread-sanitizer.cpp
blob: abffae3a8fab99e0312e3cc74814d2cc080f1564 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -o - %s -fsanitize=thread -relaxed-aliasing -O1 | FileCheck %s

// Make sure we do not crash when relaxed-aliasing is on.
// CHECK-NOT: !tbaa
struct iterator { void *node; };

struct pair {
  iterator first;
  pair(const iterator &a) : first(a) {}
};

void equal_range() {
  (void)pair(iterator());
}