mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-24 22:08:57 -04:00
10 lines
451 B
C
10 lines
451 B
C
// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only -Wno-gnu-statement-expression
|
|
|
|
int stmtexpr_fn();
|
|
void stmtexprs(int i) {
|
|
__builtin_assume( ({ 1; }) ); // no warning about "side effects"
|
|
__builtin_assume( ({ if (i) { (void)0; }; 42; }) ); // no warning about "side effects"
|
|
// expected-warning@+1 {{the argument to '__builtin_assume' has side effects that will be discarded}}
|
|
__builtin_assume( ({ if (i) ({ stmtexpr_fn(); }); 1; }) );
|
|
}
|