YouCompleteMe/cpp/llvm/tools/clang/test/SemaCXX/zero-length-arrays.cpp
Strahinja Val Markovic 1f51a89d39 Adding more llvm/clang files
These were ignored by git accidentally. We want ALL OF THEM since they all came
in the llvm/clang source distribution.
2012-07-05 17:55:45 -07:00

27 lines
328 B
C++

// RUN: %clang_cc1 -fsyntax-only -verify %s
// <rdar://problem/10228639>
class Foo {
~Foo();
Foo(const Foo&);
public:
Foo(int);
};
class Bar {
int foo_count;
Foo foos[0];
Foo foos2[0][2];
Foo foos3[2][0];
public:
Bar(): foo_count(0) { }
~Bar() { }
};
void testBar() {
Bar b;
Bar b2(b);
b = b2;
}