]> granicus.if.org Git - clang/commit
Teach -Wtautological-overlap-compare about enums
authorGeorge Burgess IV <george.burgess.iv@gmail.com>
Thu, 1 Oct 2015 18:47:52 +0000 (18:47 +0000)
committerGeorge Burgess IV <george.burgess.iv@gmail.com>
Thu, 1 Oct 2015 18:47:52 +0000 (18:47 +0000)
commita1eeb192a5d15a5fb60f9ed90a1b45e94625ca39
treeae827450c3ff4547c97ca9422e7115a55e67c61e
parent4ff927030141966b63e52f703d49511b2ee9ab31
Teach -Wtautological-overlap-compare about enums

Prior to this patch, -Wtautological-overlap-compare would only warn us
if there was a sketchy logical comparison between variables and
IntegerLiterals. This patch makes -Wtautological-overlap-compare aware
of EnumConstantDecls, so it can apply the same logic to them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@249053 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/CFG.cpp
test/Sema/warn-overlap.c