diff --git a/clang-tools-extra/test/clang-tidy/check_clang_tidy.py b/clang-tools-extra/test/clang-tidy/check_clang_tidy.py index aa6304baef81..368b674d2d32 100755 --- a/clang-tools-extra/test/clang-tidy/check_clang_tidy.py +++ b/clang-tools-extra/test/clang-tidy/check_clang_tidy.py @@ -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) diff --git a/clang-tools-extra/test/clang-tidy/darwin-dispatch-once-nonstatic.mm b/clang-tools-extra/test/clang-tidy/darwin-dispatch-once-nonstatic.mm index 7a2bac318190..92d6f453c66d 100644 --- a/clang-tools-extra/test/clang-tidy/darwin-dispatch-once-nonstatic.mm +++ b/clang-tools-extra/test/clang-tidy/darwin-dispatch-once-nonstatic.mm @@ -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));