diff options
author | bloodstalker <thabogre@gmail.com> | 2020-03-30 15:46:16 +0000 |
---|---|---|
committer | bloodstalker <thabogre@gmail.com> | 2020-03-30 15:46:16 +0000 |
commit | a6c42a803ccf9327191caa0a419a8761df2d3d63 (patch) | |
tree | c45004c340b1601c332b636596069c1c7fcee490 | |
parent | declarations no longer print out the declarations since they are already matc... (diff) | |
download | cgrep-a6c42a803ccf9327191caa0a419a8761df2d3d63.tar.gz cgrep-a6c42a803ccf9327191caa0a419a8761df2d3d63.zip |
removed the debug prints. boost is no longer a dependency.1.1
-rw-r--r-- | cgrep.cpp | 9 | ||||
-rw-r--r-- | makefile | 2 | ||||
-rw-r--r-- | pch.hpp | 1 |
3 files changed, 3 insertions, 9 deletions
@@ -689,13 +689,10 @@ public: explicit TraceVarHandlerSub(Rewriter &Rewrite) : Rewrite(Rewrite) {} virtual void run(const MatchFinder::MatchResult &MR) { - std::cout << "called\n"; const DeclRefExpr *DRE = MR.Nodes.getNodeAs<clang::DeclRefExpr>("tracevardeclrefexpr"); if (DRE) { if (DRE->getFoundDecl() == ND) { - std::cout << "DRE:" << std::hex << DRE->getFoundDecl() << "\n"; - std::cout << "ND:" << std::hex << ND << "\n"; std::cout << DRE->getLocation().printToString(*(MR.SourceManager)) << "\n"; } @@ -715,11 +712,8 @@ class TraceVarHandler : public MatchFinder::MatchCallback { public: explicit TraceVarHandler(Rewriter &Rewrite) : Rewrite(Rewrite), SubMatcher(Rewrite) {} - ~TraceVarHandler() { - std::cout << "Destroy\n"; - } - virtual void run(const MatchFinder::MatchResult &MR) { + virtual void run(const MatchFinder::MatchResult &MR) override { const VarDecl *VD = MR.Nodes.getNodeAs<clang::VarDecl>("tracevar"); if (VD) { SourceRange SR = VD->getSourceRange(); @@ -740,6 +734,7 @@ public: } } + private: MatchFinder Matcher; Rewriter &Rewrite [[maybe_unused]]; @@ -18,7 +18,7 @@ endif CXX_EXTRA?= CTAGS_I_PATH?=./ #LD_FLAGS= -lstdc++fs -LD_FLAGS= -lboost_system -lboost_filesystem +LD_FLAGS= EXTRA_LD_FLAGS?= ADD_SANITIZERS_CC= -g -fsanitize=address -fno-omit-frame-pointer ADD_SANITIZERS_LD= -g -fsanitize=address @@ -11,7 +11,6 @@ #include "clang/Tooling/CommonOptionsParser.h" #include "clang/Tooling/Tooling.h" #include "llvm/Support/raw_ostream.h" -#include <boost/filesystem.hpp> #include <cassert> #include <cstdlib> #include <dirent.h> |