mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 16:16:39 +00:00

bit fields of zero size. Warnings are generated in C++ mode and if only such type is defined inside extern "C" block. The patch fixed PR5065. Differential Revision: http://llvm-reviews.chandlerc.com/D2151 llvm-svn: 194653
8 lines
353 B
C++
8 lines
353 B
C++
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
|
extern const int PR6495a = 42;
|
|
extern int PR6495b = 42; // expected-warning{{'extern' variable has an initializer}}
|
|
extern const int PR6495c[] = {42,43,44};
|
|
|
|
extern struct Test1 {}; // expected-warning {{'extern' is not permitted on a declaration of a type}}
|
|
extern "C" struct Test0 { int x; }; // no warning
|