clang: include/clang/AST/DataCollection.h File Reference (original) (raw)

This file declares helper methods for collecting data from AST nodes.

To collect data from Stmt nodes, subclass ConstStmtVisitor and include StmtDataCollectors.inc after defining the macros that you need. This provides data collection implementations for most Stmt kinds. Note that the code requires some conditions to be met:

It is also possible to override individual visit methods. Have a look at the DataCollector in lib/Analysis/CloneDetection.cpp for a usage example.

Definition in file DataCollection.h.