]> granicus.if.org Git - clang/commit
Properly handle typos in the conditional of ?: expressions in C.
authorKaelyn Takata <rikka@google.com>
Tue, 27 Jan 2015 18:26:18 +0000 (18:26 +0000)
committerKaelyn Takata <rikka@google.com>
Tue, 27 Jan 2015 18:26:18 +0000 (18:26 +0000)
commit26fa5675bf3abe1f3c9371cb104c936c4f60ac27
tree7325a4c5da0fb052d132a202543ebe53488ceb57
parent351e556babd40e652454246cc8cd86dcdc94377c
Properly handle typos in the conditional of ?: expressions in C.

In particular, remove the OpaqueExpr transformation from r225389 and
move the correction of the conditional from CheckConditionalOperands to
ActOnConditionalOp before the OpaqueExpr is created. This fixes the
typo correction behavior in C code that uses the GNU extension for a
binary ?: (without an expression between the "?" and the ":").

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@227220 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaExpr.cpp
lib/Sema/SemaExprCXX.cpp
test/Sema/typo-correction.c