blob: 896751ad6e31b874675725fe9378e4f5195f0056 [file] [log] [blame]
Rafael Espindola68045b12011-12-30 03:13:44 +00001// RUN: %clang_cc1 %s -std=c++11 -emit-llvm-only
2// CHECK that we don't crash.
3
Richard Smith1d0c9a82012-02-14 21:14:13 +00004// PR11676's example is ill-formed:
5/*
Rafael Espindola68045b12011-12-30 03:13:44 +00006union _XEvent {
7};
8void ProcessEvent() {
9 _XEvent pluginEvent = _XEvent();
10}
Richard Smith1d0c9a82012-02-14 21:14:13 +000011*/
12
13// Example from PR11665:
14void f() {
15 union U { int field; } u = U();
16 (void)U().field;
17}