1 // RUN: %clang_cc1 -fsyntax-only -verify %s
4 template <class Key, class T> struct QMap
6 void insert(const Key &, const T &);
11 template <class Key, class T>
12 void QMap<Key, T>::insert(const Key &, const T &avalue)
22 // clang doesn't like '[]':
23 // cannot initialize a parameter of type 'void *' with an rvalue of type 'char (*)[]'
31 inotify_event* ptr = &event;
32 inotify_event event1 = *ptr;
34 QMap<int, inotify_event> eventForId;
35 eventForId.insert(ptr->wd, *ptr);
44 S strings[]; // expected-error {{flexible array member 'strings' of non-POD element type 'S []'}}
57 namespace rdar9065507 {
65 struct Storage : StorageBase {
69 struct VirtStorage : virtual StorageBase {
70 int data[]; // expected-error {{flexible array member 'data' not allowed in struct which has a virtual base class}}