summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-07-29 14:29:34 +0000
committerDouglas Gregor <dgregor@apple.com>2010-07-29 14:29:34 +0000
commitda2955ed744e1f753546f0a1d4d6b51931e63084 (patch)
tree6fb7d786fa5426d97c32f483a2258eeed6426151 /clang/lib/Parse/ParseDecl.cpp
parent07035e6a00f85c699d595d48da1f1e44874ca9d1 (diff)
downloadbcm5719-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.cpp4
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;
OpenPOWER on IntegriCloud