[PATCH] D41708: [clang-tidy] Update fuchsia-overloaded-operator to check for valid loc

Alexander Kornienko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 3 15:14:18 PST 2018

alexfh added inline comments.

Comment at: clang-tidy/fuchsia/OverloadedOperatorCheck.cpp:38
+  if (Loc.isValid())
+    diag(Loc, "cannot overload %0") << D;
This is not related to the fix, but the warning message is unclear, incorrect and confusing: one most certainly _can_ overload these functions, but shouldn't do this in fuchsia code due to certain reasons. Ideally, warning messages should make it clear to the reader what's wrong with the code, why, and how to fix it.

  rCTE Clang Tools Extra


More information about the cfe-commits mailing list