[Sema] Use CK_NoOp instead CK_Invalid in tryGCCVectorConvertAndSplat
authorVitaly Buka <vitalybuka@google.com>
Mon, 15 May 2017 22:04:03 +0000 (22:04 +0000)
committerVitaly Buka <vitalybuka@google.com>
Mon, 15 May 2017 22:04:03 +0000 (22:04 +0000)
commitdcac9f51d89960496734fa5006f203eb5bb3b4f2
tree5d9b99a32fae6afd84d5a4f94c35d0b4cea9274d
parent6a1d02024efff810bf35b6e73cfcab2821522281
[Sema] Use CK_NoOp instead CK_Invalid in tryGCCVectorConvertAndSplat

This fix UBSAN bots after r302935. Storing non-defined values in enum is
undefined behavior.

Other places, where "if (ScalarCast != CK_Invalid)" is used, never get to the
"if" with CK_Invalid. tryGCCVectorConvertAndSplat can get to the "if" with
CK_Invalid and it looks like expected case. So we have to use something other
than CK_Invalid, e.g. CK_NoOp.

llvm-svn: 303121
clang/lib/Sema/SemaExpr.cpp