[PATCH] D59336: [clang-tidy] Disable google-runtime-int in Objective-C++ 🔓

Stephane Moore via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 18 17:41:03 PDT 2019


stephanemoore marked 3 inline comments as done.
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:'
+
----------------
stephanemoore wrote:
> 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.
Apparently it was because I removed the `--` as well 😅 I have now removed `-x objective-c`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D59336





More information about the cfe-commits mailing list