]> granicus.if.org Git - clang/commit
[Sema] Suppress a warning about a forward-declared fixed enum in C mode
authorErik Pilkington <erik.pilkington@gmail.com>
Fri, 18 Jan 2019 21:33:23 +0000 (21:33 +0000)
committerErik Pilkington <erik.pilkington@gmail.com>
Fri, 18 Jan 2019 21:33:23 +0000 (21:33 +0000)
commitda6440b5b99d40f0540d7210ffeb4835e66a7f22
tree11688561fe8ff84ddf638dfbee7d26b1c9e826ad
parent87155c67f399837e1875acd5658a8ff76c3f3164
[Sema] Suppress a warning about a forward-declared fixed enum in C mode

As of r343360, we support fixed-enums in C. This lead to some
warnings in project headers where a fixed enum is forward declared
then later defined. In C++, this is fine, the forward declaration is
treated as a complete type even though the definition isn't present.
We use this rule in C too, but still warn about the forward
declaration anyways. This patch suppresses the warning.

rdar://problem/47356469

Differential revision: https://reviews.llvm.org/D56879

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351595 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaDecl.cpp
test/Sema/fixed-enum.c