[cfe-dev] Finding a variable declaration in several files

gilad beer via cfe-dev cfe-dev at lists.llvm.org
Thu May 26 07:31:07 PDT 2016


Hello,

I'm trying to write a Clang Tidy check that will generate a warning if a
certain variable is declared as "extern" in more than one file.

I was able to add find extern variable declarations using AST matchers, but
so far I haven't managed to determine in my check if a variable is declared
in two different files.

Does the Clang Tidy API provide a way of remembering nodes that were
matched in previous checks? Or should I implement it myself (for example
using a list or writing to a file)?

Thanks!
Gilad Beer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160526/5f9233bb/attachment.html>


More information about the cfe-dev mailing list