[PATCH] D85097: [Sema] add warning for comparisons like 'x<=y<=z'

Arthur O'Dwyer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 2 18:43:45 PDT 2020


Quuxplusone added inline comments.


================
Comment at: clang/lib/Sema/SemaExpr.cpp:14047
 
+static bool isComparisonOpSamePrecedence(BinaryOperatorKind Opc) {
+  switch (Opc) {
----------------
Same precedence as what?
I think this should just be called `isRelationalOperator`, and I would bet money that such a classifier function already exists somewhere in the codebase.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85097



More information about the cfe-commits mailing list