-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[Clang][NFC] Move HeadingAndSpellings to avoid copying #143611
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Clang][NFC] Move HeadingAndSpellings to avoid copying #143611
Conversation
Static analysis flagged that we could move HeadingAndSpellings and avoid a copy of a large object.
@llvm/pr-subscribers-clang Author: Shafik Yaghmour (shafik) ChangesStatic 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:
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;
}
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/157/builds/30546 Here is the relevant piece of the build log for the reference
|
Static analysis flagged that we could move HeadingAndSpellings and avoid a copy of a large object.
Static analysis flagged that we could move HeadingAndSpellings and avoid a copy of a large object.
Static analysis flagged that we could move HeadingAndSpellings and avoid a copy of a large object.