Index: clang-tidy/fuchsia/OverloadedOperatorCheck.cpp =================================================================== --- clang-tidy/fuchsia/OverloadedOperatorCheck.cpp +++ clang-tidy/fuchsia/OverloadedOperatorCheck.cpp @@ -30,8 +30,10 @@ } void OverloadedOperatorCheck::check(const MatchFinder::MatchResult &Result) { - if (const auto *D = Result.Nodes.getNodeAs("decl")) - diag(D->getLocStart(), "cannot overload %0") << D; + if (const auto *D = Result.Nodes.getNodeAs("decl")) { + if (D->getLocStart().isValid()) + diag(D->getLocStart(), "cannot overload %0") << D; + } } } // namespace fuchsia Index: test/clang-tidy/fuchsia-overloaded-operator.cpp =================================================================== --- test/clang-tidy/fuchsia-overloaded-operator.cpp +++ test/clang-tidy/fuchsia-overloaded-operator.cpp @@ -16,3 +16,6 @@ A operator-(const A &A1, const A &A2); // CHECK-MESSAGES: [[@LINE-1]]:1: warning: cannot overload 'operator-' [fuchsia-overloaded-operator] + +void operator delete (void*, void*) throw(); +// CHECK-MESSAGES: [[@LINE-1]]:1: warning: cannot overload 'operator delete' [fuchsia-overloaded-operator]