sammccall added inline comments.

================
Comment at: clang/lib/Sema/SemaExpr.cpp:14255
+  if (Opc <= BO_Assign || Opc > BO_OrAssign)
+    return BinaryOperator::Create(Context, LHS, RHS, Opc, Context.DependentTy,
+                                  VK_RValue, OK_Ordinary, OpLoc,
----------------
I think we can do better on types here: for several binary operators the type 
is boolean in C regardless of operands. (except for vector types I think, but 
those might be rare enough to ignore in recovery)


================
Comment at: clang/lib/Sema/SemaExpr.cpp:14258
+                                  CurFPFeatureOverrides());
+  return CompoundAssignOperator::Create(
+      Context, LHS, RHS, Opc, Context.DependentTy, VK_LValue, OK_Ordinary,
----------------
In C the result type is the unqualified type of the LHS


================
Comment at: clang/lib/Sema/SemaExpr.cpp:14260
+      Context, LHS, RHS, Opc, Context.DependentTy, VK_LValue, OK_Ordinary,
+      OpLoc, CurFPFeatureOverrides(), Context.DependentTy, 
Context.DependentTy);
+}
----------------
I don't think we need to override the computation types, we can just leave them 
null?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84226

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to