[clang] [Clang][Sema] Expose static inline functions from GMF (PR #104701)

via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 18 05:02:43 PDT 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 dac182990dabe8d15cfb8079aba68df2ded015aa feaf6512fc6323ad0c3d5082c06e610504f0a527 --extensions cppm,cpp -- clang/test/Modules/expose-static-inline-from-gmf-1.cppm clang/test/Modules/expose-static-inline-from-gmf-2.cppm clang/test/Modules/expose-static-inline-from-gmf-3.cppm clang/test/Modules/expose-static-inline-from-gmf-4.cppm clang/test/Modules/expose-static-inline-from-gmf-5.cppm clang/lib/Sema/SemaOverload.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 ca070d0e22..594b607149 100644
--- a/clang/lib/Sema/SemaOverload.cpp
+++ b/clang/lib/Sema/SemaOverload.cpp
@@ -6941,9 +6941,9 @@ void Sema::AddOverloadCandidate(
     /// Inline functions with internal linkage are a common pattern in headers
     /// to avoid ODR issues.
     const bool IsInlineFunctionInGMF =
-          Function->getOwningModule() &&
-          Function->getOwningModule()->isGlobalModule() &&
-          (IsImplicitlyInstantiated || Function->isInlined());
+        Function->getOwningModule() &&
+        Function->getOwningModule()->isGlobalModule() &&
+        (IsImplicitlyInstantiated || Function->isInlined());
 
     if (ND->getFormalLinkage() == Linkage::Internal && !IsInlineFunctionInGMF) {
       Candidate.Viable = false;

``````````

</details>


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


More information about the cfe-commits mailing list