blob: 550500906892b811391f092c8f9d567f97e07845 [file] [log] [blame]
Nick Lewycky32d4abf2012-01-24 21:28:47 +00001// RUN: %clang_cc1 -triple=x86_64-pc-linux-gnu -Wover-aligned -verify %s
Nick Lewyckyfca84b22012-01-24 21:15:41 +00002
3// This test verifies that we don't warn when the global operator new is
4// overridden. That's why we can't merge this with the other test file.
5
6void* operator new(unsigned long);
7void* operator new[](unsigned long);
8
9struct Test {
10 template <typename T>
11 struct SeparateCacheLines {
12 T data;
13 } __attribute__((aligned(256)));
14
15 SeparateCacheLines<int> high_contention_data[10];
16};
17
18void helper() {
19 Test t;
20 new Test;
21 new Test[10];
22}