diff options
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | cgrep.cpp | 21 | ||||
-rwxr-xr-x | covrun.sh | 1 | ||||
-rw-r--r-- | makefile | 4 |
4 files changed, 5 insertions, 23 deletions
@@ -3,8 +3,6 @@ [![Language grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/bloodstalker/cgrep.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/bloodstalker/cgrep/context:cpp) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/726c70d0e3294f149036fa6134998fe8)](https://www.codacy.com/manual/bloodstalker/cgrep?utm_source=github.com&utm_medium=referral&utm_content=bloodstalker/cgrep&utm_campaign=Badge_Grade) [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fbloodstalker%2Fcgrep.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fbloodstalker%2Fcgrep?ref=badge_shield) -[![Coverity Scan Build Status](https://scan.coverity.com/projects/19431/badge.svg)](https://scan.coverity.com/projects/bloodstalker-cgrep) -[![Coverage Status](https://coveralls.io/repos/github/bloodstalker/cgrep/badge.svg?branch=master)](https://coveralls.io/github/bloodstalker/cgrep?branch=master) [![Gitter](https://badges.gitter.im/mutatortools/community.svg)](https://gitter.im/mutatortools/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) # cgrep @@ -866,21 +866,6 @@ private: Rewriter TheRewriter; }; /***********************************************************************************************/ -static ClangTool build_cgrep_instance(int argc, const char **argv) { - CommonOptionsParser op(argc, argv, CGrepCat); - ClangTool cgrepInstance(op.getCompilations(), op.getSourcePathList()); - - return cgrepInstance; -} - -static int run_cgrep_instance(ClangTool cgrepToolInstance) { - int ret = cgrepToolInstance.run( - newFrontendActionFactory<AppFrontendAction>().get()); - - return ret; -} - -/***********************************************************************************************/ /*Main*/ int main(int argc, const char **argv) { CommonOptionsParser op(argc, argv, CGrepCat); @@ -888,10 +873,8 @@ int main(int argc, const char **argv) { op.getSourcePathList(); ClangTool Tool(op.getCompilations(), op.getSourcePathList()); int ret = Tool.run(newFrontendActionFactory<AppFrontendAction>().get()); -#if 0 - if ("" != CO_RECURSIVE) { - dig(CO_RECURSIVE, argc, argv); - } +#if 1 + listDirs(CO_RECURSIVE); #endif return ret; } @@ -12,3 +12,4 @@ LLVM_PROFILE_FILE="eight.profraw" "./cgrep-cov" -A 1 -B 1 --cxxcall --call --reg LLVM_PROFILE_FILE="nine.profraw" "./cgrep-cov" -A 1 -B 1 --memvar --regex ite ./cgrep.cpp LLVM_PROFILE_FILE="ten.profraw" "./cgrep-cov" --union --regex [Uu]nion ./test/main.cpp LLVM_PROFILE_FILE="eleven.profraw" "./cgrep-cov" --struct --regex [sS]truct ./test/main.cpp +LLVM_PROFILE_FILE="twelve.profraw" "./cgrep-cov" --dir ./ --regex run --func ./cgrep.cpp @@ -133,12 +133,12 @@ $(TARGET)-cov: $(TARGET).ocov ./cfe-extra/cfe_extra.ocov cov: runcov @llvm-profdata merge -sparse ./one.profraw ./two.profraw ./three.profraw ./four.profraw ./five.profraw ./six.profraw ./seven.profraw \ - ./eight.profraw ./nine.profraw ./ten.profraw ./eleven.profraw -o ./cgrep.profdata + ./eight.profraw ./nine.profraw ./ten.profraw ./eleven.profraw ./twelve.profraw -o ./cgrep.profdata @llvm-cov show $(TARGET)-cov -instr-profile=cgrep.profdata -ignore-filename-regex=llvm clang covrep: runcov @llvm-profdata merge -sparse ./one.profraw ./two.profraw ./three.profraw ./four.profraw ./five.profraw ./six.profraw ./seven.profraw \ - ./eight.profraw ./nine.profraw ./ten.profraw ./eleven.profraw -o ./cgrep.profdata + ./eight.profraw ./nine.profraw ./ten.profraw ./eleven.profraw ./twelve.profraw -o ./cgrep.profdata @llvm-cov report $(TARGET)-cov -instr-profile=cgrep.profdata -ignore-filename-regex=llvm -ignore-filename-regex=clang -show-functions cgrep.cpp ASM:$(ASM_LIST) |