[PATCH] D55648: [CodeComplete] Fill preferred type on binary expressions

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 13 08:04:40 PST 2018


ilya-biryukov added a comment.

Thanks for the review!



================
Comment at: lib/Sema/SemaCodeComplete.cpp:4928
+    if (LHSType->isIntegralOrEnumerationType())
+      return S.getASTContext().IntTy;
+    return QualType();
----------------
kadircet wrote:
> why not LHSType ?
The shifts are non-symmetrical, so it didn't feel the link between lhs and rhs provided much value.
It's not true for other ops, e.g. `|`, where you would typically use the same operand type for both values.

It's not a very strong argument, though, happy to change this code later.



Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55648/new/

https://reviews.llvm.org/D55648





More information about the cfe-commits mailing list