[libcxx-commits] [PATCH] D88816: [libcxx][dsl] Fix mutable default argument warning

Alexander Richardson via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Oct 5 15:23:55 PDT 2020


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGe426ae2bd5e0: [libcxx][dsl] Fix mutable default argument warning (authored by arichardson).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88816

Files:
  libcxx/utils/libcxx/test/dsl.py


Index: libcxx/utils/libcxx/test/dsl.py
===================================================================
--- libcxx/utils/libcxx/test/dsl.py
+++ libcxx/utils/libcxx/test/dsl.py
@@ -6,15 +6,20 @@
 #
 #===----------------------------------------------------------------------===##
 
-import libcxx.test.format
-import lit
-import lit.util
 import os
 import pipes
 import platform
 import re
 import tempfile
 
+import libcxx.test.format
+import lit
+import lit.LitConfig
+import lit.Test
+import lit.TestRunner
+import lit.util
+
+
 def _memoize(f):
   cache = dict()
   def memoized(x):
@@ -83,7 +88,7 @@
     _executeScriptInternal(test, ['rm %t.exe'])
     return exitCode == 0
 
-def programOutput(config, program, args=[], testPrefix=''):
+def programOutput(config, program, args=None, testPrefix=''):
   """
   Compiles a program for the test target, run it on the test target and return
   the output.
@@ -92,6 +97,8 @@
   execution of the program is done through the %{exec} substitution, which means
   that the program may be run on a remote host depending on what %{exec} does.
   """
+  if args is None:
+    args = []
   with _makeConfigTest(config, testPrefix=testPrefix) as test:
     with open(test.getSourcePath(), 'w') as source:
       source.write(program)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88816.296314.patch
Type: text/x-patch
Size: 1278 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20201005/cb3deefa/attachment-0001.bin>


More information about the libcxx-commits mailing list