[cfe-dev] Trying to write new clang-tidy check, have a problem with RecursiveASTVisitor.
Roman Lebedev via cfe-dev
cfe-dev at lists.llvm.org
Thu May 4 05:00:47 PDT 2017
Hi all!
I'm attempting to write a new clang-tidy check, misc-assertion-count.
The current version of the code is available in :
https://github.com/LebedevRI/clang-tools-extra/tree/misc-assertion-count--for-cfe-dev.
What's missing is docs, and handling for a few more special cases, at least
C++ lambdas.
As the subj suggests, i'm having a trouble with RecursiveASTVisitor. During
function AST traversal, i would like to completely avoid c++11's lambdas.
As it was suggested on #llvm, i implemented TraverseLambdaExpr() and
TraverseLambdaBody(), but as you can see from those assert()'s, they are never
called. So the lambdas are still visited... The lit test for the check would
start failing if they are no longer visited.
So here comes the question: am i missing something really obvious?
Am i overriding those functions incorrectly? Or are they not supposed to be
overridden? How to do it?
Roman.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170504/0d1a9e94/attachment.sig>
More information about the cfe-dev
mailing list