[clang] Recognize friend operator != to fix ambiguity with operator== (PR #70217)

via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 25 08:10:11 PDT 2023


github-actions[bot] wrote:


<!--LLVM CODE FORMAT COMMENT: {clang-format}-->

:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff cc2fbc648d7babbfa612f4f5eda3160212ef6ca7 26b9570fadf428e2f55efe0f2d9433cf18305239 -- clang/lib/Sema/SemaOverload.cpp clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p3-2a.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp
index ce7503162ef3..3b6b47488634 100644
--- a/clang/lib/Sema/SemaOverload.cpp
+++ b/clang/lib/Sema/SemaOverload.cpp
@@ -960,7 +960,7 @@ static bool shouldAddReversedEqEq(Sema &S, SourceLocation OpLoc,
       if (FunctionsCorrespond(S.Context, EqFD, Op->getAsFunction()))
         return false;
     return true;
-  } 
+  }
   // Otherwise the search scope is the namespace scope of which F is a member.
   DeclContext *EqDC = EqFD->getEnclosingNamespaceContext();
   for (NamedDecl *Op : EqDC->lookup(NotEqOp)) {

``````````

</details>


https://github.com/llvm/llvm-project/pull/70217


More information about the cfe-commits mailing list