Skip to content

Commit 62ac81f

Browse files
authored
merge main into amd-staging (llvm#2055)
2 parents 8193e42 + a817508 commit 62ac81f

File tree

164 files changed

+2532
-1081
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

164 files changed

+2532
-1081
lines changed

clang-tools-extra/clang-doc/Representation.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ struct CommentInfo {
6060
// the vector.
6161
bool operator<(const CommentInfo &Other) const;
6262

63+
// TODO: The Kind field should be an enum, so we can switch on it easily.
6364
SmallString<16>
6465
Kind; // Kind of comment (FullComment, ParagraphComment, TextComment,
6566
// InlineCommandComment, HTMLStartTagComment, HTMLEndTagComment,
@@ -534,6 +535,7 @@ struct ClangDocContext {
534535
std::vector<std::string> UserStylesheets;
535536
// JavaScript files that will be imported in all HTML files.
536537
std::vector<std::string> JsScripts;
538+
// Base directory for remote repositories.
537539
StringRef Base;
538540
Index Idx;
539541
};

clang/docs/LanguageExtensions.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1859,12 +1859,18 @@ The following type trait primitives are supported by Clang. Those traits marked
18591859
* ``__is_trivially_constructible`` (C++, GNU, Microsoft)
18601860
* ``__is_trivially_copyable`` (C++, GNU, Microsoft)
18611861
* ``__is_trivially_destructible`` (C++, MSVC 2013)
1862-
* ``__is_trivially_relocatable`` (Clang): Returns true if moving an object
1862+
* ``__is_trivially_relocatable`` (Clang) (Deprecated,
1863+
use ``__builtin_is_cpp_trivially_relocatable`` instead).
1864+
Returns true if moving an object
18631865
of the given type, and then destroying the source object, is known to be
18641866
functionally equivalent to copying the underlying bytes and then dropping the
18651867
source object on the floor. This is true of trivial types,
18661868
C++26 relocatable types, and types which
18671869
were made trivially relocatable via the ``clang::trivial_abi`` attribute.
1870+
This trait is deprecated and should be replaced by
1871+
``__builtin_is_cpp_trivially_relocatable``. Note however that it is generally
1872+
unsafe to relocate a C++-relocatable type with ``memcpy`` or ``memmove``;
1873+
use ``__builtin_trivially_relocate``.
18681874
* ``__builtin_is_cpp_trivially_relocatable`` (C++): Returns true if an object
18691875
is trivially relocatable, as defined by the C++26 standard [meta.unary.prop].
18701876
Note that when relocating the caller code should ensure that if the object is polymorphic,

clang/docs/ReleaseNotes.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,9 @@ Improvements to Clang's diagnostics
521521
- ``-Wreserved-identifier`` now fires on reserved parameter names in a function
522522
declaration which is not a definition.
523523

524+
- Several compatibility diagnostics that were incorrectly being grouped under
525+
``-Wpre-c++20-compat`` are now part of ``-Wc++20-compat``. (#GH138775)
526+
524527
Improvements to Clang's time-trace
525528
----------------------------------
526529

@@ -590,6 +593,15 @@ Bug Fixes to Compiler Builtins
590593
- ``__has_unique_object_representations(Incomplete[])`` is no longer accepted, per
591594
`LWG4113 <https://cplusplus.github.io/LWG/issue4113>`_.
592595

596+
- ``__builtin_is_cpp_trivially_relocatable``, ``__builtin_is_replaceable`` and
597+
``__builtin_trivially_relocate`` have been added to support standard C++26 relocation.
598+
599+
- ``__is_trivially_relocatable`` has been deprecated, and uses should be replaced by
600+
``__builtin_is_cpp_trivially_relocatable``.
601+
Note that, it is generally unsafe to ``memcpy`` non-trivially copyable types that
602+
are ``__builtin_is_cpp_trivially_relocatable``. It is recommended to use
603+
``__builtin_trivially_relocate`` instead.
604+
593605
Bug Fixes to Attribute Support
594606
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
595607
- Fixed crash when a parameter to the ``clang::annotate`` attribute evaluates to ``void``. See #GH119125

clang/include/clang/APINotes/Types.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,7 @@ class TagInfo : public CommonTypeInfo {
737737
std::optional<std::string> SwiftImportAs;
738738
std::optional<std::string> SwiftRetainOp;
739739
std::optional<std::string> SwiftReleaseOp;
740+
std::optional<std::string> SwiftDefaultOwnership;
740741

741742
/// The Swift protocol that this type should be automatically conformed to.
742743
std::optional<std::string> SwiftConformance;
@@ -786,6 +787,8 @@ class TagInfo : public CommonTypeInfo {
786787
SwiftRetainOp = RHS.SwiftRetainOp;
787788
if (!SwiftReleaseOp)
788789
SwiftReleaseOp = RHS.SwiftReleaseOp;
790+
if (!SwiftDefaultOwnership)
791+
SwiftDefaultOwnership = RHS.SwiftDefaultOwnership;
789792

790793
if (!SwiftConformance)
791794
SwiftConformance = RHS.SwiftConformance;
@@ -815,6 +818,7 @@ inline bool operator==(const TagInfo &LHS, const TagInfo &RHS) {
815818
LHS.SwiftImportAs == RHS.SwiftImportAs &&
816819
LHS.SwiftRetainOp == RHS.SwiftRetainOp &&
817820
LHS.SwiftReleaseOp == RHS.SwiftReleaseOp &&
821+
LHS.SwiftDefaultOwnership == RHS.SwiftDefaultOwnership &&
818822
LHS.SwiftConformance == RHS.SwiftConformance &&
819823
LHS.isFlagEnum() == RHS.isFlagEnum() &&
820824
LHS.isSwiftCopyable() == RHS.isSwiftCopyable() &&

clang/include/clang/AST/DeclCXX.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3864,8 +3864,7 @@ class UsingPackDecl final
38643864
InstantiatedFrom ? InstantiatedFrom->getDeclName()
38653865
: DeclarationName()),
38663866
InstantiatedFrom(InstantiatedFrom), NumExpansions(UsingDecls.size()) {
3867-
std::uninitialized_copy(UsingDecls.begin(), UsingDecls.end(),
3868-
getTrailingObjects<NamedDecl *>());
3867+
llvm::uninitialized_copy(UsingDecls, getTrailingObjects<NamedDecl *>());
38693868
}
38703869

38713870
void anchor() override;
@@ -4236,8 +4235,7 @@ class DecompositionDecl final
42364235
: VarDecl(Decomposition, C, DC, StartLoc, LSquareLoc, nullptr, T, TInfo,
42374236
SC),
42384237
NumBindings(Bindings.size()) {
4239-
std::uninitialized_copy(Bindings.begin(), Bindings.end(),
4240-
getTrailingObjects<BindingDecl *>());
4238+
llvm::uninitialized_copy(Bindings, getTrailingObjects<BindingDecl *>());
42414239
for (auto *B : Bindings) {
42424240
B->setDecomposedDecl(this);
42434241
if (B->isParameterPack() && B->getBinding()) {

clang/include/clang/AST/DeclOpenACC.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include "clang/AST/Decl.h"
1919
#include "clang/AST/OpenACCClause.h"
2020
#include "clang/Basic/OpenACCKinds.h"
21+
#include "llvm/ADT/STLExtras.h"
2122

2223
namespace clang {
2324

@@ -85,8 +86,8 @@ class OpenACCDeclareDecl final
8586
: OpenACCConstructDecl(OpenACCDeclare, DC, OpenACCDirectiveKind::Declare,
8687
StartLoc, DirLoc, EndLoc) {
8788
// Initialize the trailing storage.
88-
std::uninitialized_copy(Clauses.begin(), Clauses.end(),
89-
getTrailingObjects<const OpenACCClause *>());
89+
llvm::uninitialized_copy(Clauses,
90+
getTrailingObjects<const OpenACCClause *>());
9091

9192
setClauseList(MutableArrayRef(getTrailingObjects<const OpenACCClause *>(),
9293
Clauses.size()));
@@ -136,8 +137,8 @@ class OpenACCRoutineDecl final
136137
assert(LParenLoc.isValid() &&
137138
"Cannot represent implicit name with this declaration");
138139
// Initialize the trailing storage.
139-
std::uninitialized_copy(Clauses.begin(), Clauses.end(),
140-
getTrailingObjects<const OpenACCClause *>());
140+
llvm::uninitialized_copy(Clauses,
141+
getTrailingObjects<const OpenACCClause *>());
141142
setClauseList(MutableArrayRef(getTrailingObjects<const OpenACCClause *>(),
142143
Clauses.size()));
143144
}

clang/include/clang/AST/ExprCXX.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
#include "clang/Basic/TypeTraits.h"
4242
#include "llvm/ADT/ArrayRef.h"
4343
#include "llvm/ADT/PointerUnion.h"
44+
#include "llvm/ADT/STLExtras.h"
4445
#include "llvm/ADT/StringRef.h"
4546
#include "llvm/ADT/iterator_range.h"
4647
#include "llvm/Support/Casting.h"
@@ -4417,7 +4418,7 @@ class SizeOfPackExpr final
44174418
assert((!Length || PartialArgs.empty()) &&
44184419
"have partial args for non-dependent sizeof... expression");
44194420
auto *Args = getTrailingObjects<TemplateArgument>();
4420-
std::uninitialized_copy(PartialArgs.begin(), PartialArgs.end(), Args);
4421+
llvm::uninitialized_copy(PartialArgs, Args);
44214422
setDependence(Length ? ExprDependence::None
44224423
: ExprDependence::ValueInstantiation);
44234424
}
@@ -4522,8 +4523,7 @@ class PackIndexingExpr final
45224523
FullySubstituted(FullySubstituted) {
45234524

45244525
auto *Exprs = getTrailingObjects<Expr *>();
4525-
std::uninitialized_copy(SubstitutedExprs.begin(), SubstitutedExprs.end(),
4526-
Exprs);
4526+
llvm::uninitialized_copy(SubstitutedExprs, Exprs);
45274527

45284528
setDependence(computeDependence(this));
45294529
if (!isInstantiationDependent())

clang/include/clang/AST/OpenACCClause.h

Lines changed: 26 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@
1313

1414
#ifndef LLVM_CLANG_AST_OPENACCCLAUSE_H
1515
#define LLVM_CLANG_AST_OPENACCCLAUSE_H
16+
1617
#include "clang/AST/ASTContext.h"
1718
#include "clang/AST/StmtIterator.h"
1819
#include "clang/Basic/OpenACCKinds.h"
20+
#include "llvm/ADT/STLExtras.h"
1921

2022
#include <utility>
2123
#include <variant>
@@ -291,8 +293,7 @@ class OpenACCDeviceTypeClause final
291293
"Only a single asterisk version is permitted, and must be the "
292294
"only one");
293295

294-
std::uninitialized_copy(Archs.begin(), Archs.end(),
295-
getTrailingObjects<DeviceTypeArgument>());
296+
llvm::uninitialized_copy(Archs, getTrailingObjects<DeviceTypeArgument>());
296297
}
297298

298299
public:
@@ -537,10 +538,9 @@ class OpenACCWaitClause final
537538
QueuesLoc(QueuesLoc) {
538539
// The first element of the trailing storage is always the devnum expr,
539540
// whether it is used or not.
540-
std::uninitialized_copy(&DevNumExpr, &DevNumExpr + 1,
541-
getTrailingObjects<Expr *>());
542-
std::uninitialized_copy(QueueIdExprs.begin(), QueueIdExprs.end(),
543-
getTrailingObjects<Expr *>() + 1);
541+
auto *Exprs = getTrailingObjects<Expr *>();
542+
llvm::uninitialized_copy(ArrayRef(DevNumExpr), Exprs);
543+
llvm::uninitialized_copy(QueueIdExprs, Exprs + 1);
544544
setExprs(
545545
MutableArrayRef(getTrailingObjects<Expr *>(), QueueIdExprs.size() + 1));
546546
}
@@ -579,8 +579,7 @@ class OpenACCNumGangsClause final
579579
ArrayRef<Expr *> IntExprs, SourceLocation EndLoc)
580580
: OpenACCClauseWithExprs(OpenACCClauseKind::NumGangs, BeginLoc, LParenLoc,
581581
EndLoc) {
582-
std::uninitialized_copy(IntExprs.begin(), IntExprs.end(),
583-
getTrailingObjects<Expr *>());
582+
llvm::uninitialized_copy(IntExprs, getTrailingObjects<Expr *>());
584583
setExprs(MutableArrayRef(getTrailingObjects<Expr *>(), IntExprs.size()));
585584
}
586585

@@ -609,8 +608,7 @@ class OpenACCTileClause final
609608
ArrayRef<Expr *> SizeExprs, SourceLocation EndLoc)
610609
: OpenACCClauseWithExprs(OpenACCClauseKind::Tile, BeginLoc, LParenLoc,
611610
EndLoc) {
612-
std::uninitialized_copy(SizeExprs.begin(), SizeExprs.end(),
613-
getTrailingObjects<Expr *>());
611+
llvm::uninitialized_copy(SizeExprs, getTrailingObjects<Expr *>());
614612
setExprs(MutableArrayRef(getTrailingObjects<Expr *>(), SizeExprs.size()));
615613
}
616614

@@ -848,8 +846,7 @@ class OpenACCPrivateClause final
848846
ArrayRef<Expr *> VarList, SourceLocation EndLoc)
849847
: OpenACCClauseWithVarList(OpenACCClauseKind::Private, BeginLoc,
850848
LParenLoc, EndLoc) {
851-
std::uninitialized_copy(VarList.begin(), VarList.end(),
852-
getTrailingObjects<Expr *>());
849+
llvm::uninitialized_copy(VarList, getTrailingObjects<Expr *>());
853850
setExprs(MutableArrayRef(getTrailingObjects<Expr *>(), VarList.size()));
854851
}
855852

@@ -871,8 +868,7 @@ class OpenACCFirstPrivateClause final
871868
ArrayRef<Expr *> VarList, SourceLocation EndLoc)
872869
: OpenACCClauseWithVarList(OpenACCClauseKind::FirstPrivate, BeginLoc,
873870
LParenLoc, EndLoc) {
874-
std::uninitialized_copy(VarList.begin(), VarList.end(),
875-
getTrailingObjects<Expr *>());
871+
llvm::uninitialized_copy(VarList, getTrailingObjects<Expr *>());
876872
setExprs(MutableArrayRef(getTrailingObjects<Expr *>(), VarList.size()));
877873
}
878874

@@ -894,8 +890,7 @@ class OpenACCDevicePtrClause final
894890
ArrayRef<Expr *> VarList, SourceLocation EndLoc)
895891
: OpenACCClauseWithVarList(OpenACCClauseKind::DevicePtr, BeginLoc,
896892
LParenLoc, EndLoc) {
897-
std::uninitialized_copy(VarList.begin(), VarList.end(),
898-
getTrailingObjects<Expr *>());
893+
llvm::uninitialized_copy(VarList, getTrailingObjects<Expr *>());
899894
setExprs(MutableArrayRef(getTrailingObjects<Expr *>(), VarList.size()));
900895
}
901896

@@ -917,8 +912,7 @@ class OpenACCAttachClause final
917912
ArrayRef<Expr *> VarList, SourceLocation EndLoc)
918913
: OpenACCClauseWithVarList(OpenACCClauseKind::Attach, BeginLoc, LParenLoc,
919914
EndLoc) {
920-
std::uninitialized_copy(VarList.begin(), VarList.end(),
921-
getTrailingObjects<Expr *>());
915+
llvm::uninitialized_copy(VarList, getTrailingObjects<Expr *>());
922916
setExprs(MutableArrayRef(getTrailingObjects<Expr *>(), VarList.size()));
923917
}
924918

@@ -940,8 +934,7 @@ class OpenACCDetachClause final
940934
ArrayRef<Expr *> VarList, SourceLocation EndLoc)
941935
: OpenACCClauseWithVarList(OpenACCClauseKind::Detach, BeginLoc, LParenLoc,
942936
EndLoc) {
943-
std::uninitialized_copy(VarList.begin(), VarList.end(),
944-
getTrailingObjects<Expr *>());
937+
llvm::uninitialized_copy(VarList, getTrailingObjects<Expr *>());
945938
setExprs(MutableArrayRef(getTrailingObjects<Expr *>(), VarList.size()));
946939
}
947940

@@ -963,8 +956,7 @@ class OpenACCDeleteClause final
963956
ArrayRef<Expr *> VarList, SourceLocation EndLoc)
964957
: OpenACCClauseWithVarList(OpenACCClauseKind::Delete, BeginLoc, LParenLoc,
965958
EndLoc) {
966-
std::uninitialized_copy(VarList.begin(), VarList.end(),
967-
getTrailingObjects<Expr *>());
959+
llvm::uninitialized_copy(VarList, getTrailingObjects<Expr *>());
968960
setExprs(MutableArrayRef(getTrailingObjects<Expr *>(), VarList.size()));
969961
}
970962

@@ -986,8 +978,7 @@ class OpenACCUseDeviceClause final
986978
ArrayRef<Expr *> VarList, SourceLocation EndLoc)
987979
: OpenACCClauseWithVarList(OpenACCClauseKind::UseDevice, BeginLoc,
988980
LParenLoc, EndLoc) {
989-
std::uninitialized_copy(VarList.begin(), VarList.end(),
990-
getTrailingObjects<Expr *>());
981+
llvm::uninitialized_copy(VarList, getTrailingObjects<Expr *>());
991982
setExprs(MutableArrayRef(getTrailingObjects<Expr *>(), VarList.size()));
992983
}
993984

@@ -1009,8 +1000,7 @@ class OpenACCNoCreateClause final
10091000
ArrayRef<Expr *> VarList, SourceLocation EndLoc)
10101001
: OpenACCClauseWithVarList(OpenACCClauseKind::NoCreate, BeginLoc,
10111002
LParenLoc, EndLoc) {
1012-
std::uninitialized_copy(VarList.begin(), VarList.end(),
1013-
getTrailingObjects<Expr *>());
1003+
llvm::uninitialized_copy(VarList, getTrailingObjects<Expr *>());
10141004
setExprs(MutableArrayRef(getTrailingObjects<Expr *>(), VarList.size()));
10151005
}
10161006

@@ -1032,8 +1022,7 @@ class OpenACCPresentClause final
10321022
ArrayRef<Expr *> VarList, SourceLocation EndLoc)
10331023
: OpenACCClauseWithVarList(OpenACCClauseKind::Present, BeginLoc,
10341024
LParenLoc, EndLoc) {
1035-
std::uninitialized_copy(VarList.begin(), VarList.end(),
1036-
getTrailingObjects<Expr *>());
1025+
llvm::uninitialized_copy(VarList, getTrailingObjects<Expr *>());
10371026
setExprs(MutableArrayRef(getTrailingObjects<Expr *>(), VarList.size()));
10381027
}
10391028

@@ -1054,8 +1043,7 @@ class OpenACCHostClause final
10541043
ArrayRef<Expr *> VarList, SourceLocation EndLoc)
10551044
: OpenACCClauseWithVarList(OpenACCClauseKind::Host, BeginLoc, LParenLoc,
10561045
EndLoc) {
1057-
std::uninitialized_copy(VarList.begin(), VarList.end(),
1058-
getTrailingObjects<Expr *>());
1046+
llvm::uninitialized_copy(VarList, getTrailingObjects<Expr *>());
10591047
setExprs(MutableArrayRef(getTrailingObjects<Expr *>(), VarList.size()));
10601048
}
10611049

@@ -1078,8 +1066,7 @@ class OpenACCDeviceClause final
10781066
ArrayRef<Expr *> VarList, SourceLocation EndLoc)
10791067
: OpenACCClauseWithVarList(OpenACCClauseKind::Device, BeginLoc, LParenLoc,
10801068
EndLoc) {
1081-
std::uninitialized_copy(VarList.begin(), VarList.end(),
1082-
getTrailingObjects<Expr *>());
1069+
llvm::uninitialized_copy(VarList, getTrailingObjects<Expr *>());
10831070
setExprs(MutableArrayRef(getTrailingObjects<Expr *>(), VarList.size()));
10841071
}
10851072

@@ -1107,8 +1094,7 @@ class OpenACCCopyClause final
11071094
Spelling == OpenACCClauseKind::PCopy ||
11081095
Spelling == OpenACCClauseKind::PresentOrCopy) &&
11091096
"Invalid clause kind for copy-clause");
1110-
std::uninitialized_copy(VarList.begin(), VarList.end(),
1111-
getTrailingObjects<Expr *>());
1097+
llvm::uninitialized_copy(VarList, getTrailingObjects<Expr *>());
11121098
setExprs(MutableArrayRef(getTrailingObjects<Expr *>(), VarList.size()));
11131099
}
11141100

@@ -1142,8 +1128,7 @@ class OpenACCCopyInClause final
11421128
Spelling == OpenACCClauseKind::PCopyIn ||
11431129
Spelling == OpenACCClauseKind::PresentOrCopyIn) &&
11441130
"Invalid clause kind for copyin-clause");
1145-
std::uninitialized_copy(VarList.begin(), VarList.end(),
1146-
getTrailingObjects<Expr *>());
1131+
llvm::uninitialized_copy(VarList, getTrailingObjects<Expr *>());
11471132
setExprs(MutableArrayRef(getTrailingObjects<Expr *>(), VarList.size()));
11481133
}
11491134

@@ -1176,8 +1161,7 @@ class OpenACCCopyOutClause final
11761161
Spelling == OpenACCClauseKind::PCopyOut ||
11771162
Spelling == OpenACCClauseKind::PresentOrCopyOut) &&
11781163
"Invalid clause kind for copyout-clause");
1179-
std::uninitialized_copy(VarList.begin(), VarList.end(),
1180-
getTrailingObjects<Expr *>());
1164+
llvm::uninitialized_copy(VarList, getTrailingObjects<Expr *>());
11811165
setExprs(MutableArrayRef(getTrailingObjects<Expr *>(), VarList.size()));
11821166
}
11831167

@@ -1210,8 +1194,7 @@ class OpenACCCreateClause final
12101194
Spelling == OpenACCClauseKind::PCreate ||
12111195
Spelling == OpenACCClauseKind::PresentOrCreate) &&
12121196
"Invalid clause kind for create-clause");
1213-
std::uninitialized_copy(VarList.begin(), VarList.end(),
1214-
getTrailingObjects<Expr *>());
1197+
llvm::uninitialized_copy(VarList, getTrailingObjects<Expr *>());
12151198
setExprs(MutableArrayRef(getTrailingObjects<Expr *>(), VarList.size()));
12161199
}
12171200

@@ -1241,8 +1224,7 @@ class OpenACCReductionClause final
12411224
: OpenACCClauseWithVarList(OpenACCClauseKind::Reduction, BeginLoc,
12421225
LParenLoc, EndLoc),
12431226
Op(Operator) {
1244-
std::uninitialized_copy(VarList.begin(), VarList.end(),
1245-
getTrailingObjects<Expr *>());
1227+
llvm::uninitialized_copy(VarList, getTrailingObjects<Expr *>());
12461228
setExprs(MutableArrayRef(getTrailingObjects<Expr *>(), VarList.size()));
12471229
}
12481230

@@ -1268,8 +1250,7 @@ class OpenACCLinkClause final
12681250
ArrayRef<Expr *> VarList, SourceLocation EndLoc)
12691251
: OpenACCClauseWithVarList(OpenACCClauseKind::Link, BeginLoc, LParenLoc,
12701252
EndLoc) {
1271-
std::uninitialized_copy(VarList.begin(), VarList.end(),
1272-
getTrailingObjects<Expr *>());
1253+
llvm::uninitialized_copy(VarList, getTrailingObjects<Expr *>());
12731254
setExprs(MutableArrayRef(getTrailingObjects<Expr *>(), VarList.size()));
12741255
}
12751256

@@ -1293,8 +1274,7 @@ class OpenACCDeviceResidentClause final
12931274
ArrayRef<Expr *> VarList, SourceLocation EndLoc)
12941275
: OpenACCClauseWithVarList(OpenACCClauseKind::DeviceResident, BeginLoc,
12951276
LParenLoc, EndLoc) {
1296-
std::uninitialized_copy(VarList.begin(), VarList.end(),
1297-
getTrailingObjects<Expr *>());
1277+
llvm::uninitialized_copy(VarList, getTrailingObjects<Expr *>());
12981278
setExprs(MutableArrayRef(getTrailingObjects<Expr *>(), VarList.size()));
12991279
}
13001280

0 commit comments

Comments
 (0)