[clang] a180d54 - AST Matchers test: use arrays instead of vectors
Dmitri Gribenko via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 4 12:43:21 PDT 2020
Author: Dmitri Gribenko
Date: 2020-06-04T21:40:30+02:00
New Revision: a180d5409f218d933bec99bc28f7a9970fb293d4
URL: https://github.com/llvm/llvm-project/commit/a180d5409f218d933bec99bc28f7a9970fb293d4
DIFF: https://github.com/llvm/llvm-project/commit/a180d5409f218d933bec99bc28f7a9970fb293d4.diff
LOG: AST Matchers test: use arrays instead of vectors
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D81180
Added:
Modified:
clang/unittests/ASTMatchers/ASTMatchersTest.h
Removed:
################################################################################
diff --git a/clang/unittests/ASTMatchers/ASTMatchersTest.h b/clang/unittests/ASTMatchers/ASTMatchersTest.h
index 54f73826af60..11aedf65ec29 100644
--- a/clang/unittests/ASTMatchers/ASTMatchersTest.h
+++ b/clang/unittests/ASTMatchers/ASTMatchersTest.h
@@ -59,24 +59,23 @@ class VerifyMatch : public MatchFinder::MatchCallback {
};
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;
}
More information about the cfe-commits
mailing list