[PATCH] D45392: [clang-tidy] add new check to find out objc ivars which do not have prefix '_'

Yan Zhang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 12 11:12:03 PDT 2018


Wizard added inline comments.


================
Comment at: test/clang-tidy/readability-identifier-naming-objc.m:4
+// RUN:  [{key: readability-identifier-naming.ObjcIvarPrefix, value: '_'}]}' \
+// RUN: --
+
----------------
alexfh wrote:
> The `--` and the trailing backslash above can be removed as well.
I tried but when I run the test there some error output:
Running ['clang-tidy', '/Users/ynzhang/clang-llvm/build/tools/clang/tools/extra/test/clang-tidy/Output/readability-identifier-naming-objc.m.tmp.m', '-fix', '--checks=-*,readability-identifier-naming', '-config={CheckOptions:   [{key: readability-identifier-naming.ObjcIvarPrefix, value: _}]}', '-nostdinc++']...
clang-tidy failed:
LLVM ERROR: CommonOptionsParser: failed to parse command-line arguments. [CommonOptionsParser]: clang-tidy: Unknown command line argument '-nostdinc++'.  Try: 'clang-tidy -help'
clang-tidy: Did you mean '-gpsize'?

No idea where '-nostdinc++' came from, but there is no such problem with these stuff added. I actually followed the command pattern in objc-forbidden-subclassing-custom.m


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D45392





More information about the cfe-commits mailing list