]> granicus.if.org Git - clang/commit
Fix Sema for compares with _Atomic vars.
authorEli Friedman <eli.friedman@gmail.com>
Mon, 8 Jul 2013 20:20:06 +0000 (20:20 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Mon, 8 Jul 2013 20:20:06 +0000 (20:20 +0000)
commit09bddcf8c0ce4cc2f2a18e050e971539e8a396f8
tree511262798235631a3691072b7bbb98e3a116d9f1
parent526df0f3a8d436e9084bd12118a2e119aa0bd724
Fix Sema for compares with _Atomic vars.

Use UsualArithmeticConversions unconditionally in analysis of
comparisons and conditional operators: the method performs
the usual arithmetic conversions if both sides are arithmetic, and
usual unary conversions if they are not.  This is just a cleanup
for conditional operators; for comparisons, it fixes the issue that
we would try to check isArithmetic() on an atomic type.

Also, fix GetExprRange() in SemaChecking.cpp so it deals with variables
of atomic type correctly.

Fixes PR15537.

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