Skip to content

Commit 4f8773f

Browse files
committed
Add a test feature 'swift_ast_verifier'
1 parent e15132a commit 4f8773f

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

docs/Testing.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,9 @@ use this pattern::
308308
Features for ``REQUIRES`` and ``XFAIL``
309309
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
310310

311-
FIXME: list.
311+
FIXME: full list.
312+
313+
* ``swift_ast_verifier``: present if the AST verifier is enabled in this build.
312314

313315
When writing a test specific to x86, if possible, prefer ``REQUIRES:
314316
CPU=i386_or_x86_64`` to ``REQUIRES: CPU=x86_64``.

test/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ if(PYTHONINTERP_FOUND)
133133
# Normalize spelling of boolean values.
134134
normalize_boolean_spelling(LLVM_ENABLE_ASSERTIONS)
135135
normalize_boolean_spelling(SWIFT_STDLIB_ASSERTIONS)
136+
normalize_boolean_spelling(SWIFT_AST_VERIFIER)
136137
normalize_boolean_spelling(SWIFT_ASAN_BUILD)
137138

138139
# A directory where to put the xUnit-style XML test results.

test/lit.site.cfg.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ if "@SWIFT_STDLIB_ASSERTIONS@" == "TRUE":
3232
else:
3333
config.available_features.add('swift_stdlib_no_asserts')
3434

35+
if "@SWIFT_AST_VERIFIER@" == "TRUE":
36+
config.available_features.add('swift_ast_verifier')
37+
3538
if "@SWIFT_OPTIMIZED@" == "TRUE":
3639
config.available_features.add("optimized_stdlib")
3740

validation-test/compiler_crashers/26725-llvm-smallvectorimpl-swift-diagnosticargument-operator.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
// RUN: not --crash %target-swift-frontend %s -parse
2+
3+
// This test fails in the AST verifier, which can be turned off.
4+
// REQUIRES: swift_ast_verifier
5+
26
// Distributed under the terms of the MIT license
37
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
48
// Test case found by fuzzing

0 commit comments

Comments
 (0)