virtual-function-in-union.cpp 137 Bytes Raw Blame History Permalink 1 2 3 4 5 // RUN: %clang_cc1 -fsyntax-only -verify %s union x { virtual void f(); // expected-error {{unions cannot have virtual functions}} };