[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 12:43:27 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGa180d5409f21: AST Matchers test: use arrays instead of vectors (authored by gribozavr).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81180/new/

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.268566.patch
Type: text/x-patch
Size: 1276 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200604/fbcdfdcf/attachment.bin>


More information about the cfe-commits mailing list