]> granicus.if.org Git - clang/commit
Sema: Cleanup and simplify anonymous union diagnostics
authorDavid Majnemer <david.majnemer@gmail.com>
Sat, 2 Nov 2013 10:38:05 +0000 (10:38 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Sat, 2 Nov 2013 10:38:05 +0000 (10:38 +0000)
commit633c0c2fbc1d9272b3f25220ffb8fe4b04ece3db
tree1902e3e68752497658fe7b2ea6331e2857d7108d
parent6f6dc158ee2fbe5b9b8685dad45be02cba0873f5
Sema: Cleanup and simplify anonymous union diagnostics

The determination of which diagnostics would be issued for certain
anonymous unions started to get a little ridiculous.  Clean this up by
inverting the condition-tree's logic from dialect -> issue to
issue -> diagnostic.

As part of this cleanup, move ext_c99_flexible_array_member from
DiagnosticParseKinds.td to DiagnosticSemaKinds.td because it's driven by
Sema, not Parse.

Also, the liberty was taken to edit ext_c99_flexible_array_member to
match other, similar, diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193919 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticParseKinds.td
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaDecl.cpp
test/Sema/c89.c
test/SemaCXX/c99.cpp