xaizek / unused-funcs (License: GPLv2+) (since 2018-12-07)
Clang-based standalone tool that detects unused external functions in a set of source files.
Commit 3c29cd537965d6fba65b14fb003a0aa99c9a9d30

Skip diagnostics automatically provided by Clang
Author: xaizek
Author date (UTC): 2014-04-06 10:01
Committer name: xaizek
Committer date (UTC): 2014-04-06 10:01
Parent(s): 02d82e07e480bb75c64ab87de67bd68401056145
Signing key:
Tree: 6c4b91c5c4fe80f70600cfb46c94b0187c042bc5
File Lines added Lines deleted
unused-funcs.cpp 13 1
File unused-funcs.cpp changed (mode: 100644) (index 8017e1b..1d2728c)
20 20
21 21 #include <llvm/Support/CommandLine.h> #include <llvm/Support/CommandLine.h>
22 22
23 #include <clang/Basic/Diagnostic.h>
24
23 25 #include <clang/Tooling/CommonOptionsParser.h> #include <clang/Tooling/CommonOptionsParser.h>
24 26 #include <clang/Tooling/Tooling.h> #include <clang/Tooling/Tooling.h>
25 27
 
... ... main(int argc, const char *argv[])
38 40 ClangTool tool(optionsParser.getCompilations(), ClangTool tool(optionsParser.getCompilations(),
39 41 optionsParser.getSourcePathList()); optionsParser.getSourcePathList());
40 42
41 Finder finder;
43 class : public clang::DiagnosticConsumer
44 {
45 public:
46 virtual bool
47 IncludeInDiagnosticCounts() const
48 {
49 return false;
50 }
51 } diagConsumer;
52 tool.setDiagnosticConsumer(&diagConsumer);
42 53
54 Finder finder;
43 55 return tool.run(newFrontendActionFactory(&finder.getMatchFinder())); return tool.run(newFrontendActionFactory(&finder.getMatchFinder()));
44 56 } }
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/unused-funcs

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/unused-funcs

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master