stephanemoore added inline comments.

================
Comment at: clang-tools-extra/test/clang-tidy/google-runtime-int.m:1
+// RUN: clang-tidy -checks=-*,google-runtime-int %s 2>&1 -- -x objective-c | 
not grep 'warning:\|error:'
+
----------------
aaron.ballman wrote:
> We typically use `| count 0` instead of an explicit grep. Also, do you really 
> need to pass `-x objective-c`?
I had chosen to use `grep` and had explicitly specified the language to be 
consistent with 
[google-runtime-int.c](https://github.com/llvm/llvm-project/blob/master/clang-tools-extra/test/clang-tidy/google-runtime-int.c#L1).
 I agree that `| count 0` is more common and have switched to that approach.

I thought that I should be able to remove `-x objective-c` but when I try to I 
get an error loading the compilation database:
```
Error while trying to load a compilation database:
Could not auto-detect compilation database for file 
"path_to_llvm_project/clang-tools-extra/test/clang-tidy/google-runtime-int.m"
No compilation database found in 
path_to_llvm_project/clang-tools-extra/test/clang-tidy or any parent directory
fixed-compilation-database: Error while opening fixed database: No such file or 
directory
json-compilation-database: Error while opening JSON database: No such file or 
directory
Running without flags.
```
I am still investigating the underlying reason.


================
Comment at: clang-tools-extra/test/clang-tidy/google-runtime-int.mm:1
+// RUN: clang-tidy -checks=-*,google-runtime-int %s -- -x objective-c++ 2>&1 | 
not grep 'warning:\|error:'
+
----------------
aaron.ballman wrote:
> Given that the contents of the file are the same, I would just add this RUN 
> line to the previous test case (changing to `| count 0`). You will still need 
> the `-x objective-c++` in that case.
Makes sense. Done.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D59336



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

Reply via email to