summaryrefslogtreecommitdiff
path: root/clang/test/SemaCXX/compound-literal.cpp
blob: fe0e45d3c6ab186db2c85a3fcdf930b72ee3011a (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// RUN: %clang_cc1 -fsyntax-only -verify %s

// http://llvm.org/PR7905
namespace PR7905 {
struct S; // expected-note {{forward declaration}}
void foo1() {
  (void)(S[]) {{3}}; // expected-error {{array has incomplete element type}}
}

template <typename T> struct M { T m; };
void foo2() {
  (void)(M<short> []) {{3}};
}
}