diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-07-29 14:29:34 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-07-29 14:29:34 +0000 |
| commit | da2955ed744e1f753546f0a1d4d6b51931e63084 (patch) | |
| tree | 6fb7d786fa5426d97c32f483a2258eeed6426151 /clang/lib/Parse/ParseDecl.cpp | |
| parent | 07035e6a00f85c699d595d48da1f1e44874ca9d1 (diff) | |
| download | bcm5719-llvm-da2955ed744e1f753546f0a1d4d6b51931e63084.tar.gz bcm5719-llvm-da2955ed744e1f753546f0a1d4d6b51931e63084.zip | |
Reword the empty struct/union warning in C to note that such structs and unions have size 0 in C, size 1 in C++. Put this warning under -Wc++-compat.
llvm-svn: 109748
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
| -rw-r--r-- | clang/lib/Parse/ParseDecl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index 62ef3ec0179..6f65640d605 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/lib/Parse/ParseDecl.cpp @@ -1782,8 +1782,8 @@ void Parser::ParseStructUnionBody(SourceLocation RecordLoc, // Empty structs are an extension in C (C99 6.7.2.1p7), but are allowed in // C++. if (Tok.is(tok::r_brace) && !getLang().CPlusPlus) - Diag(Tok, diag::ext_empty_struct_union_enum) - << DeclSpec::getSpecifierName((DeclSpec::TST)TagType); + Diag(Tok, diag::ext_empty_struct_union) + << (TagType == TST_union); llvm::SmallVector<DeclPtrTy, 32> FieldDecls; |

