Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Sema / builtin-assume-separate-storage.c
blobf27d0b821d5abeaad7d698f91e5c978414562733
1 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -verify %s
3 void *nonconst(void);
5 void test1(int *a, int *b) {
6 __builtin_assume_separate_storage(a, b);
7 // Separate storage assumptions evaluate their arguments unconditionally, like
8 // assume_aligned but *unlike* assume. Check that we don't warn on it.
9 __builtin_assume_separate_storage(a, nonconst());
10 __builtin_assume_separate_storage(nonconst(), a);
11 __builtin_assume_separate_storage(a, 3); // expected-error {{incompatible integer to pointer conversion}}
12 __builtin_assume_separate_storage(3, a); // expected-error {{incompatible integer to pointer conversion}}