Sign in
llvm
/
llvm-project
/
refs/heads/users/ojhunt/while-loop-scope
/
.
/
clang
/
test
/
SemaCXX
/
for-static-assert.cpp
blob: f08044324e13b918a7f40a1bea333bf321cb0371 [
file
] [
log
] [
blame
]
// RUN: %clang_cc1 -fsyntax-only -verify %s
// C permits a 'static_assert' in the first part of a 'for' loop
// whereas C++ does not.
void
f
()
{
for
(
static_assert
(
true
);;)
{}
// expected-error {{expected expression}}
}