]> granicus.if.org Git - clang/commit
[PR36008] Avoid -Wsign-compare warning for enum constants in
authorAlex Lorenz <arphaman@gmail.com>
Wed, 7 Feb 2018 20:45:39 +0000 (20:45 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Wed, 7 Feb 2018 20:45:39 +0000 (20:45 +0000)
commit7f5ae1507eb73f1825c301940a594c206048c52b
treeaee2c01a14fba3b483e273d0b419f66359de8f0c
parentb887aacccd6345757f9190272911d65ffd6d54d2
[PR36008] Avoid -Wsign-compare warning for enum constants in
typeof expressions

This commit looks through typeof type at the original expression when diagnosing
-Wsign-compare to avoid an unfriendly diagnostic.

rdar://36588828

Differential Revision: https://reviews.llvm.org/D42561

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@324514 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaChecking.cpp
test/Sema/compare.c