njames93 added inline comments.

================
Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-no-escape.m:1
+// RUN: %check_clang_tidy %s bugprone-no-escape %t
+
----------------
aaron.ballman wrote:
> Can you add an additional RUN line so we get coverage of the blocks-enabled 
> behavior? Something like:
> ```
> // RUN: %check_clang_tidy %s bugprone-no-escape %t -- -- -fblocks -x c
> ```
> I'm not 100% certain I have that syntax right, but the idea is to run the 
> test as though it were a C compilation unit with blocks explicitly enabled.
check_clang_tidy will add `-fobjc-abi-version=2`, `-fobjc-arc` and `-fblocks` 
if the file extension is `.m` or `.mm`.
You can trick it with `assume-filename` to stop that happening
```
// RUN: %check_clang_tidy %s -assume-filename=bugprone-no-escape.c 
bugprone-no-escape %t -- -- -fblocks
```

Not 100% certain that is the right syntax but that feels like the designed way 
to run the test as a C compilation unit


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82904/new/

https://reviews.llvm.org/D82904



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to