[clang] [Clang][NFC] Move HeadingAndSpellings to avoid copying (PR #143611)
https://github.com/shafik closed https://github.com/llvm/llvm-project/pull/143611 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [Clang][NFC] Move HeadingAndSpellings to avoid copying (PR #143611)
https://github.com/AaronBallman approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/143611 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [Clang][NFC] Move HeadingAndSpellings to avoid copying (PR #143611)
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Shafik Yaghmour (shafik)
Changes
Static analysis flagged that we could move HeadingAndSpellings and avoid a copy
of a large object.
---
Full diff: https://github.com/llvm/llvm-project/pull/143611.diff
1 Files Affected:
- (modified) clang/utils/TableGen/ClangAttrEmitter.cpp (+1-1)
``diff
diff --git a/clang/utils/TableGen/ClangAttrEmitter.cpp
b/clang/utils/TableGen/ClangAttrEmitter.cpp
index 21d76c12a3cce..42627f02cf356 100644
--- a/clang/utils/TableGen/ClangAttrEmitter.cpp
+++ b/clang/utils/TableGen/ClangAttrEmitter.cpp
@@ -5405,7 +5405,7 @@ void EmitClangAttrDocs(const RecordKeeper &Records,
raw_ostream &OS) {
// Handle Undocumented category separately - no content merging
if (Cat == "Undocumented" && UndocumentedCategory) {
UndocumentedDocs.push_back(
-DocumentationData(Doc, Attr, HeadingAndSpellings));
+DocumentationData(Doc, Attr, std::move(HeadingAndSpellings)));
continue;
}
``
https://github.com/llvm/llvm-project/pull/143611
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [Clang][NFC] Move HeadingAndSpellings to avoid copying (PR #143611)
https://github.com/shafik created
https://github.com/llvm/llvm-project/pull/143611
Static analysis flagged that we could move HeadingAndSpellings and avoid a copy
of a large object.
>From 55d520891a09e3cd3ef85eeba501ad80d8240619 Mon Sep 17 00:00:00 2001
From: Shafik Yaghmour
Date: Tue, 10 Jun 2025 14:59:57 -0700
Subject: [PATCH] [Clang][NFC] Move HeadingAndSpellings to avoid copying
Static analysis flagged that we could move HeadingAndSpellings and avoid a copy
of a large object.
---
clang/utils/TableGen/ClangAttrEmitter.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/utils/TableGen/ClangAttrEmitter.cpp
b/clang/utils/TableGen/ClangAttrEmitter.cpp
index 21d76c12a3cce..42627f02cf356 100644
--- a/clang/utils/TableGen/ClangAttrEmitter.cpp
+++ b/clang/utils/TableGen/ClangAttrEmitter.cpp
@@ -5405,7 +5405,7 @@ void EmitClangAttrDocs(const RecordKeeper &Records,
raw_ostream &OS) {
// Handle Undocumented category separately - no content merging
if (Cat == "Undocumented" && UndocumentedCategory) {
UndocumentedDocs.push_back(
-DocumentationData(Doc, Attr, HeadingAndSpellings));
+DocumentationData(Doc, Attr, std::move(HeadingAndSpellings)));
continue;
}
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
