[PATCH] D121119: [clang][SVE] Add support for bitwise operators on SVE types
    Peter Waller via Phabricator via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Wed Mar  9 05:49:42 PST 2022
    
    
  
peterwaller-arm added a comment.
Looking reasonable to me, one comment.
================
Comment at: clang/lib/Sema/SemaExpr.cpp:10404
+                                           SourceLocation Loc,
+                                           bool IsArithmetic) {
   QualType LHSType = LHS.get()->getType().getUnqualifiedType();
----------------
There is a saying that booleans are often inferior to enums in arguments. I think this might be one of those cases, could you use the `enum ArithConvKind` instead?
As a side effect call sites will be clear without the need for a comment string:
```
CheckSizelessVectorOperands(LHS, RHS, Loc, ACK_Arithmetic);
```
... and it will be extensible to other kinds, which I presume are likely to creep in here as more operators are added.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D121119/new/
https://reviews.llvm.org/D121119
    
    
More information about the cfe-commits
mailing list