[flang-commits] [clang-tools-extra] [libc] [mlir] [compiler-rt] [llvm] [clang] [lld] [libcxxabi] [flang] [libcxx] [lldb] [clang] static operators should evaluate object argument (PR #68485)
via flang-commits
flang-commits at lists.llvm.org
Thu Jan 4 21:21:08 PST 2024
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 054b5fc0fd41bcbadcc6967c39a5f6bb151bdcd1 eb42407a523f9a79afca4fbf221b344330888cc6 -- clang/test/AST/ast-dump-static-operators.cpp clang/test/SemaCXX/cxx2b-static-operator.cpp clang/lib/AST/ExprConstant.cpp clang/lib/CodeGen/CGExpr.cpp clang/lib/Sema/SemaChecking.cpp clang/lib/Sema/SemaOverload.cpp clang/test/CodeGenCXX/cxx2b-static-call-operator.cpp clang/test/CodeGenCXX/cxx2b-static-subscript-operator.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 1810fdd12b..f9c7cf9b65 100644
--- a/clang/lib/Sema/SemaOverload.cpp
+++ b/clang/lib/Sema/SemaOverload.cpp
@@ -5682,7 +5682,9 @@ static ImplicitConversionSequence TryObjectArgumentInitialization(
// const volatile object.
// Also, a static operator can be invoked for a const, volatile or const
// volatile object, apparently.
- bool IsStaticOperator = Method->getDeclName().getCXXOverloadedOperator() != OO_None && Method->isStatic();
+ bool IsStaticOperator =
+ Method->getDeclName().getCXXOverloadedOperator() != OO_None &&
+ Method->isStatic();
Qualifiers Quals = Method->getMethodQualifiers();
if (isa<CXXDestructorDecl>(Method) || IsStaticOperator) {
Quals.addConst();
``````````
</details>
https://github.com/llvm/llvm-project/pull/68485
More information about the flang-commits
mailing list