[cfe-dev] [Clang-Tidy] Run a check failed because of getName
Mailis Cohen via cfe-dev
cfe-dev at lists.llvm.org
Tue May 24 05:23:33 PDT 2016
Dear all,
I'm a very new user of Clang-tidy and the AST and I have to write some new checks with clang-tidy (Release 270030).
I'm trying to run a check I added in a new module.
First, I installed llvm, clang and clang-tidy with the help of this tutorial : http://clang.llvm.org/get_started.html
Then, I added my module, my checks and the checks' tests thanks to this article : http://bbannier.github.io/blog/2015/05/02/Writing-a-basic-clang-static-analysis-check.html#adding-scaffolding
I can run the tests without any problem (make check-clang-tools) and I installed clang-tidy (make install).
But when I try to use my checks (clang-tidy '-checks=-,myModule-*' test.cpp) it return this error :
"clang-llvm/llvm/tools/clang/include/clang/AST/Decl.h:238: llvm::StringRef clang::NamedDecl::getName() const: Assertion `Name.isIdentifier() && "Name is not a simple identifier"' failed.
Abandon"
It's the same error if I run the default check and the default test add with the script "add_new_check.py".
I'm running out of idea... Do you know what can I do to fix it ?
Thank you very much for your help,
Maïlis Cohen.
More information about the cfe-dev
mailing list