diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-08-26 21:51:57 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-08-26 21:51:57 +0000 |
commit | 04d3b3ea0fb7a1ed7d9a290bad1c60e2cd7ad2e2 (patch) | |
tree | 3c81fd760ede976261670c43d37f38d1014cb111 /clang/lib/Sema/SemaDecl.cpp | |
parent | 3232773ed520c8e24de2e066fa9000aeee04bcc4 (diff) | |
download | bcm5719-llvm-04d3b3ea0fb7a1ed7d9a290bad1c60e2cd7ad2e2.tar.gz bcm5719-llvm-04d3b3ea0fb7a1ed7d9a290bad1c60e2cd7ad2e2.zip |
Clarify comment so this doesn't appear to be a C11-only rule.
llvm-svn: 216490
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 0079c4925ac..e5cf31a9b37 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -3450,6 +3450,9 @@ Decl *Sema::ParsedFreeStandingDeclSpec(Scope *S, AccessSpecifier AS, // C11 6.7.2.1p2: // A struct-declaration that does not declare an anonymous structure or // anonymous union shall contain a struct-declarator-list. + // + // This rule also existed in C89 and C99; the grammar for struct-declaration + // did not permit a struct-declaration without a struct-declarator-list. if (!getLangOpts().CPlusPlus && CurContext->isRecord() && DS.getStorageClassSpec() == DeclSpec::SCS_unspecified) { // Check for Microsoft C extension: anonymous struct/union member. |