summaryrefslogtreecommitdiffstats
path: root/libcxx/utils/libcxx/test/format.py
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/utils/libcxx/test/format.py')
-rw-r--r--libcxx/utils/libcxx/test/format.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/libcxx/utils/libcxx/test/format.py b/libcxx/utils/libcxx/test/format.py
index 74e3cc0aa30..8276b3f21c4 100644
--- a/libcxx/utils/libcxx/test/format.py
+++ b/libcxx/utils/libcxx/test/format.py
@@ -250,9 +250,8 @@ class LibcxxTestFormat(object):
#
# Therefore, we check if the test was expected to fail because of
# nodiscard before enabling it
- test_str = "ignoring return value of function declared with " \
- + "'nodiscard' attribute"
- if test_str in contents:
+ test_str_list = ['ignoring return value', 'nodiscard', 'NODISCARD']
+ if any(test_str in contents for test_str in test_str_list):
test_cxx.flags += ['-Werror=unused-result']
cmd, out, err, rc = test_cxx.compile(source_path, out=os.devnull)
expected_rc = 0 if use_verify else 1
OpenPOWER on IntegriCloud