[PATCH] D81180: AST Matchers test: use arrays instead of vectors
Dmitri Gribenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 4 11:33:30 PDT 2020
gribozavr created this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
gribozavr2 added a reviewer: njames93.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D81180
Files:
clang/unittests/ASTMatchers/ASTMatchersTest.h
Index: clang/unittests/ASTMatchers/ASTMatchersTest.h
===================================================================
--- clang/unittests/ASTMatchers/ASTMatchersTest.h
+++ clang/unittests/ASTMatchers/ASTMatchersTest.h
@@ -59,24 +59,23 @@
};
inline ArrayRef<TestLanguage> langCxx11OrLater() {
- static std::vector<TestLanguage> Result = {Lang_CXX11, Lang_CXX14, Lang_CXX17,
- Lang_CXX20};
+ static const TestLanguage Result[] = {Lang_CXX11, Lang_CXX14, Lang_CXX17,
+ Lang_CXX20};
return Result;
}
inline ArrayRef<TestLanguage> langCxx14OrLater() {
- static std::vector<TestLanguage> Result = {Lang_CXX14, Lang_CXX17,
- Lang_CXX20};
+ static const TestLanguage Result[] = {Lang_CXX14, Lang_CXX17, Lang_CXX20};
return Result;
}
inline ArrayRef<TestLanguage> langCxx17OrLater() {
- static std::vector<TestLanguage> Result = {Lang_CXX17, Lang_CXX20};
+ static const TestLanguage Result[] = {Lang_CXX17, Lang_CXX20};
return Result;
}
inline ArrayRef<TestLanguage> langCxx20OrLater() {
- static std::vector<TestLanguage> Result = {Lang_CXX20};
+ static const TestLanguage Result[] = {Lang_CXX20};
return Result;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81180.268541.patch
Type: text/x-patch
Size: 1276 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200604/f8d8ed71/attachment.bin>
More information about the cfe-commits
mailing list