[clang] clang/utils/TableGen/ClangAttrEmitter.cpp: 2 * pointless copy ? (#94372) (PR #94414)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 4 16:26:11 PDT 2024
https://github.com/akshaykumars614 created https://github.com/llvm/llvm-project/pull/94414
modified parameter for code quality
>From f4dd886d3a33401865f03a4ca086f6f1f0332293 Mon Sep 17 00:00:00 2001
From: akshaykumars614 <akshaykumars614 at gmail.com>
Date: Tue, 4 Jun 2024 19:25:10 -0400
Subject: [PATCH] clang/utils/TableGen/ClangAttrEmitter.cpp: 2 * pointless copy
? (#94372)
modified parameter for code quality
---
clang/utils/TableGen/ClangAttrEmitter.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/clang/utils/TableGen/ClangAttrEmitter.cpp b/clang/utils/TableGen/ClangAttrEmitter.cpp
index ca7630adfbb7b..fcc3763b00380 100644
--- a/clang/utils/TableGen/ClangAttrEmitter.cpp
+++ b/clang/utils/TableGen/ClangAttrEmitter.cpp
@@ -394,8 +394,8 @@ namespace {
public:
DefaultSimpleArgument(const Record &Arg, StringRef Attr,
- std::string T, int64_t Default)
- : SimpleArgument(Arg, Attr, T), Default(Default) {}
+ const std::string &T, int64_t Default)
+ : SimpleArgument(Arg, Attr, T), Default(Default) {}
void writeAccessors(raw_ostream &OS) const override {
SimpleArgument::writeAccessors(OS);
@@ -4994,7 +4994,7 @@ class SpellingList {
return Spellings[(size_t)K];
}
- void add(const Record &Attr, FlattenedSpelling Spelling) {
+ void add(const Record &Attr, const FlattenedSpelling &Spelling) {
SpellingKind Kind =
StringSwitch<SpellingKind>(Spelling.variety())
.Case("GNU", SpellingKind::GNU)
More information about the cfe-commits
mailing list