[PATCH] D36664: [analyzer] Make StmtDataCollector customizable

Johannes Altmanninger via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 14 01:40:39 PDT 2017


johannes created this revision.
Herald added subscribers: xazax.hun, mgorny.
Herald added 1 blocking reviewer(s): teemperor.

This moves the data collection macro calls for Stmt nodes
to lib/AST/StmtDataCollectors.inc

Users can subclass ConstStmtVisitor and include StmtDataCollectors.inc
to define visitor methods for each Stmt subclass. This makes it also
possible to customize the visit methods as exemplified in
CloneDetection.cpp.

Move helper methods for data collection to a new module,

  AST/DataCollection.

Add data collection for DeclRefExpr, MemberExpr and some literals


https://reviews.llvm.org/D36664

Files:
  include/clang/AST/DataCollection.h
  include/clang/Analysis/CloneDetection.h
  lib/AST/CMakeLists.txt
  lib/AST/DataCollection.cpp
  lib/AST/StmtDataCollectors.inc
  lib/Analysis/CloneDetection.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36664.110920.patch
Type: text/x-patch
Size: 22488 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170814/7dce2747/attachment-0001.bin>


More information about the cfe-commits mailing list