1 // RUN: %clang_cc1 -triple i386-mingw32 -fms-extensions -fsyntax-only -verify %s 2 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -verify %s 3 4 int foo(int *a, int i) { 5 #ifdef _MSC_VER 6 __assume(i != 4); 7 __assume(++i > 2); //expected-warning {{the argument to '__assume' has side effects that will be discarded}} 8 9 int test = sizeof(struct{char qq[(__assume(i != 5), 7)];}); 10 #else 11 __builtin_assume(i != 4); 12 __builtin_assume(++i > 2); //expected-warning {{the argument to '__builtin_assume' has side effects that will be discarded}} 13 14 int test = sizeof(struct{char qq[(__builtin_assume(i != 5), 7)];}); 15 #endif 16 return a[i]; 17 } 18 19