]> granicus.if.org Git - clang/commit
Fix a bunch of wrong "tautological unsigned enum compare" diagnostics in C++.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 6 Dec 2017 03:00:51 +0000 (03:00 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 6 Dec 2017 03:00:51 +0000 (03:00 +0000)
commite792818a7bc14878111ee3145ca030e24109a4f1
tree7b6137ef676823eceefc24304c6471ee50f3de26
parent5ee1bf3270a30ad876bd7f55fba8c1b1c6207298
Fix a bunch of wrong "tautological unsigned enum compare" diagnostics in C++.

An enumeration with a fixed underlying type can have any value in its
underlying type, not just those spanned by the values of its enumerators.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319875 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaChecking.cpp
test/Sema/tautological-unsigned-enum-zero-compare.cpp