[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 03:21:29 PDT 2020
arichardson created this revision.
arichardson added reviewers: libc++, ldionne.
Herald added subscribers: libcxx-commits, dexonsmith, kristof.beyls.
Herald added a project: libc++.
Herald added 1 blocking reviewer(s): libc++.
arichardson requested review of this revision.
This is flagged by PyCharm and can cause subtle bugs. While changing this
also re-sort the imports and add missing ones.
Repository:
rG LLVM Github Monorepo
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.296138.patch
Type: text/x-patch
Size: 1278 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20201005/7e3f081d/attachment.bin>
More information about the libcxx-commits
mailing list