]> granicus.if.org Git - clang/commit
Factor out comparison handling for arithmetic types.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 8 Jan 2018 21:12:04 +0000 (21:12 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 8 Jan 2018 21:12:04 +0000 (21:12 +0000)
commit6bf22943d06b0624af4ae1271857eadbfafe4e9c
treeda954793a9ecb6d8863b66394d8fc57b1ac25bf9
parent67b2951af5d23b4ef05b892d201278bdd20faad4
Factor out comparison handling for arithmetic types.

This is not quite NFC: we don't perform the usual arithmetic conversions unless
we have an operand of arithmetic or enumeration type any more. This matches the
standard rule, but actually has no effect other than to marginally improve our
diagnostics for the non-arithmetic, non-enumeration cases (by not performing
integral promotions on one operand if the other is a pointer).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@322024 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Sema/Sema.h
lib/Sema/SemaExpr.cpp
test/Parser/pointer_promotion.c