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

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 13 08:04:55 PST 2018


kadircet added inline comments.


================
Comment at: lib/Sema/SemaCodeComplete.cpp:4928
+    if (LHSType->isIntegralOrEnumerationType())
+      return S.getASTContext().IntTy;
+    return QualType();
----------------
ilya-biryukov wrote:
> 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.
> 
yeah you are right, it makes more sense this way.


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