7562c64197
Currently, this is only diagnosed but the decl is not marked invalid. This may hit assertions down the path. This also reverts the fix for PR49534 since it is not needed anymore. Reviewed By: hubert.reinterpretcast Differential Revision: https://reviews.llvm.org/D113145
6 lines
214 B
C++
6 lines
214 B
C++
// RUN: %clang_cc1 -x c++ -fsyntax-only %s -verify
|
|
|
|
static union { // expected-warning {{declaration does not declare anything}}
|
|
virtual int a(); // expected-error {{unions cannot have virtual functions}}
|
|
};
|