Moved -fblocks from an individual test to check_clang_tidy.py

This way, all tests will benefit from it and will not have to worry
about setting up language options properly.

llvm-svn: 373066
This commit is contained in:
Dmitri Gribenko 2019-09-27 10:54:28 +00:00
parent 405c3a6be1
commit 69f9f20fc5
2 changed files with 3 additions and 2 deletions

View File

@ -69,7 +69,8 @@ def run_test_once(args, extra_args):
clang_tidy_extra_args.append('-format-style=none')
if extension in ['.m', '.mm']:
clang_extra_args = ['-fobjc-abi-version=2', '-fobjc-arc'] + clang_extra_args
clang_extra_args = ['-fobjc-abi-version=2', '-fobjc-arc', '-fblocks'] + \
clang_extra_args
if extension in ['.cpp', '.hpp', '.mm']:
clang_extra_args.append('-std=' + std)

View File

@ -1,4 +1,4 @@
// RUN: %check_clang_tidy %s darwin-dispatch-once-nonstatic %t -- -- -fblocks
// RUN: %check_clang_tidy %s darwin-dispatch-once-nonstatic %t
typedef int dispatch_once_t;
extern void dispatch_once(dispatch_once_t *pred, void(^block)(void));