2009-03-24 10:24:46 +08:00
|
|
|
// RUN: clang-cc -fsyntax-only -verify %s
|
2009-02-07 21:06:23 +08:00
|
|
|
|
|
|
|
// C++-specific tests for integral constant expressions.
|
|
|
|
|
|
|
|
const int c = 10;
|
|
|
|
int ar[c];
|
2009-09-11 01:44:23 +08:00
|
|
|
|
|
|
|
struct X0 {
|
|
|
|
static const int value = static_cast<int>(4.0);
|
|
|
|
};
|
2009-09-11 07:31:45 +08:00
|
|
|
|
|
|
|
void f() {
|
|
|
|
if (const int value = 17) {
|
|
|
|
int array[value];
|
|
|
|
}
|
|
|
|
}
|