[clang] [clang][CGDebugInfo] Don't generate an implicit 'this' parameter if one was specified explicitly (PR #100767)

via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 26 08:49:25 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 56c4ec92024ae9a425d29599d27885e4d45a309f 427fe3468534d31778ae361cc057dad817ecffea --extensions cpp -- clang/test/CodeGenCXX/debug-info-explicit-this.cpp clang/lib/CodeGen/CGDebugInfo.cpp
``````````

</details>

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

``````````diff
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index ac31f5ce8a..b49dee24c3 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -1979,7 +1979,8 @@ llvm::DISubroutineType *CGDebugInfo::getOrCreateInstanceMethodType(
   Elts.push_back(Args[0]);
 
   // "this" pointer is always first argument.
-  // ThisPtr may be null if the member function has an explicit 'this' parameter.
+  // ThisPtr may be null if the member function has an explicit 'this'
+  // parameter.
   if (!ThisPtr.isNull()) {
     const CXXRecordDecl *RD = ThisPtr->getPointeeCXXRecordDecl();
     if (isa<ClassTemplateSpecializationDecl>(RD)) {

``````````

</details>


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


More information about the cfe-commits mailing list