[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)
commit14d47cfd494a41176bee0442e6c15dbbc85f1f95
tree36176b06ef7ecddf9e1d4c4b1a5e110fefb58531
parentbd3a5b29cb809fc6117569a2801d41c1d12dfe9a
[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

llvm-svn: 351595
clang/lib/Sema/SemaDecl.cpp
clang/test/Sema/fixed-enum.c