[clang] f39f53e - [Clang][NFC] Move HeadingAndSpellings to avoid copying (#143611)

via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 11 14:11:23 PDT 2025


Author: Shafik Yaghmour
Date: 2025-06-11T14:11:19-07:00
New Revision: f39f53e569f92987683626d910e9dbcbd59ff410

URL: https://github.com/llvm/llvm-project/commit/f39f53e569f92987683626d910e9dbcbd59ff410
DIFF: https://github.com/llvm/llvm-project/commit/f39f53e569f92987683626d910e9dbcbd59ff410.diff

LOG: [Clang][NFC] Move HeadingAndSpellings to avoid copying (#143611)

Static analysis flagged that we could move HeadingAndSpellings and avoid
a copy of a large object.

Added: 
    

Modified: 
    clang/utils/TableGen/ClangAttrEmitter.cpp

Removed: 
    


################################################################################
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;
       }
 


        


More information about the cfe-commits mailing list