whisperity added a comment.

I have developed a related check in D69560 <https://reviews.llvm.org/D69560>. 
That one considers types, but is an //interface rule// checker, and does not 
consider (any) potential call sites. Moreover, it does not consider "swaps" 
that happen across a function call, only, as the name implies, //adjacent// 
similar-type ranges.

Maybe one could lift the "is-similar-type", or rather, 
"is-accidentally-mixable-type" related ruling to some common location, and use 
type similarity as a precondition gate in the reports of this check?



================
Comment at: docs/clang-tidy/checks/misc-redundant-expression.rst:18
 
-Example:
+Examples:
 
----------------
This seems to be an unrelated diff.


================
Comment at: test/clang-tidy/misc-redundant-expression.cpp:20
   if (X - X) return 1;
-  // CHECK-MESSAGES: :[[@LINE-1]]:9: warning: both side of operator are 
equivalent [misc-redundant-expression]
+  // CHECK-MESSAGES: :[[@LINE-1]]:9: warning: both sides of operator are 
equivalent [misc-redundant-expression]
   if (X / X) return 1;
----------------
This entire file seems to be unrelated to the discussion at hand, perhaps a 
rebase went sideways?


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

https://reviews.llvm.org/D20689



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

Reply via email to