summaryrefslogtreecommitdiffstats
path: root/clang/tools/clang-check
Commit message (Collapse)AuthorAgeFilesLines
...
* Replace OwningPtr with std::unique_ptr.Ahmed Charles2014-03-071-1/+1
| | | | | | This compiles cleanly with lldb/lld/clang-tools-extra/llvm. llvm-svn: 203279
* Switch all uses of LLVM_OVERRIDE to just use 'override' directly.Craig Topper2014-03-021-1/+1
| | | | llvm-svn: 202625
* Sort all the #include lines with LLVM's utils/sort_includes.py whichChandler Carruth2014-01-071-2/+2
| | | | | | | encodes the canonical rules for LLVM's style. I noticed this had drifted quite a bit when cleaning up LLVM, so wanted to clean up Clang as well. llvm-svn: 198686
* Filter-out irrelevant command-line options in CommonOptionsParser.Alexander Kornienko2013-12-121-27/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Leave only -help, -version and options from the specified category. Updated clang-check and clang-tidy. As clang-tidy is in a separate repository, here's the diff: Index: tools/extra/clang-tidy/tool/ClangTidyMain.cpp =================================================================== --- tools/extra/clang-tidy/tool/ClangTidyMain.cpp (revision 197024) +++ tools/extra/clang-tidy/tool/ClangTidyMain.cpp (working copy) @@ -39,7 +39,7 @@ // FIXME: Add option to list name/description of all checks. int main(int argc, const char **argv) { - CommonOptionsParser OptionsParser(argc, argv); + CommonOptionsParser OptionsParser(argc, argv, ClangTidyCategory); SmallVector<clang::tidy::ClangTidyError, 16> Errors; clang::tidy::runClangTidy(Checks, OptionsParser.getCompilations(), Reviewers: djasper, klimek Reviewed By: djasper CC: cfe-commits, revane, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D2379 llvm-svn: 197139
* [CMake] Update target_link_libraries() and LLVM_LINK_COMPONENTS for each ↵NAKAMURA Takumi2013-12-101-6/+6
| | | | | | CMakeLists.txt. llvm-svn: 196916
* [Driver] Refactor clang driver to use LLVM's Option libraryReid Kleckner2013-06-142-2/+3
| | | | | | | | | | | | | | | | | | The big changes are: - Deleting Driver/(Arg|Opt)* - Rewriting includes to llvm/Option/ and re-sorting - 'using namespace llvm::opt' in clang::driver - Fixing the autoconf build by adding option everywhere As discussed in the review, this change includes using directives in header files. I'll make follow up changes to remove those in favor of name specifiers. Reviewers: espindola Differential Revision: http://llvm-reviews.chandlerc.com/D975 llvm-svn: 183989
* clang-check: add missing space in MakefileHans Wennborg2013-06-061-1/+1
| | | | llvm-svn: 183406
* clang-check: Link the static analyzer in the Makefile build too.Benjamin Kramer2013-06-061-3/+4
| | | | llvm-svn: 183404
* Add support for static analysis to clang-checkPavel Labath2013-06-062-8/+37
| | | | | | | | | | | | | | Summary: This adds a command line argument '-analyze' to clang-check which runs the clang static analyzer on the source files. Reviewers: klimek CC: cfe-commits, revane Differential Revision: http://llvm-reviews.chandlerc.com/D926 llvm-svn: 183399
* clang-check: Enable specification of additional compiler argumentsPavel Labath2013-06-051-0/+40
| | | | | | | | | | | | | | Summary: This adds two command-line parameters: -extra-arg and -extra-arg-before, which enable the user to pass additional parameters to the compiler command. Reviewers: klimek CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D919 llvm-svn: 183320
* these now depend on the bitcode reader too.Chris Lattner2013-01-192-1/+2
| | | | llvm-svn: 172906
* clang-check: Introduce llvm::sys::PrintStackTraceOnErrorSignal()NAKAMURA Takumi2013-01-181-0/+2
| | | | llvm-svn: 172818
* Style and Doc fix for CommonOptionsParserEdwin Vane2012-12-141-2/+2
| | | | | | | | | | | | - Renaming GetCompilations() and GetSourcePathList() to follow LLVM style. - Updating docs to reflect name change. - Also updating help text to not mention clang-check since this class can be used by any tool. Reviewed By: Alexander Kornienko llvm-svn: 170229
* clang-check: Add clangRewriteCore.a to the Makefile build to make it link again.Benjamin Kramer2012-10-031-2/+2
| | | | llvm-svn: 165119
* As opposed to the clang-fixit tool described onDaniel Jasper2012-10-033-5/+74
| | | | | | | | | http://clang.llvm.org/docs/ClangTools.html, this adds -fixit option to clang-check. Thus, clang-check can become a general-purpose tool to run clang capitalizing on the info stored in a compilation database. Review: http://llvm-reviews.chandlerc.com/D51 llvm-svn: 165110
* Workaround for MacOSX build failure with gcc <= 4.4Alexander Kornienko2012-09-101-6/+6
| | | | | | | | | | | | | | | | Summary: A better solution to http://llvm.org/bugs/show_bug.cgi?id=13777 Named namespace + more unique name to make ODR violations unlikely. Reviewers: chandlerc, doug.gregor, klimek Reviewed By: doug.gregor CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D38 llvm-svn: 163513
* Fixed http://llvm.org/bugs/show_bug.cgi?id=13777Alexander Kornienko2012-09-071-2/+4
| | | | llvm-svn: 163429
* Updated LibTooling.html, minor improvements in CommonOptionsParserAlexander Kornienko2012-08-241-1/+1
| | | | llvm-svn: 162521
* Reverted clang-check to fully supported CommandLine Library use-case: globalAlexander Kornienko2012-08-221-30/+24
| | | | | | static variables. llvm-svn: 162391
* Implemented -ast-dump, -ast-print, -ast-dump-filter options in clang-checkAlexander Kornienko2012-08-131-1/+43
| | | | llvm-svn: 161753
* [ms-inline asm] Add various MC components to clang build to support MS-style ↵Chad Rosier2012-08-091-0/+7
| | | | | | inline assembly. llvm-svn: 161594
* Add various MC components to clang build to support MS-style inline assembly.Chad Rosier2012-08-081-1/+2
| | | | llvm-svn: 161498
* Include clang-check as part of the clang installation.David Blaikie2012-07-312-1/+3
| | | | | | | | | | This also tidies up a couple of other tools we were (partially) installing: * c-index-test was being installed but shouldn't be (it's just a clang-dev tool) * diagtool was being installed in cmake but not make (& shouldn't be installed in either) Review by Manuel Klimek, Doug Gregor, and Chandler Carruth. llvm-svn: 161073
* The new clang-ast-dump tool for selective AST dumping. Moved common ↵Alexander Kornienko2012-07-161-56/+18
| | | | | | command-line tool stuff to CommandLineClangTool llvm-svn: 160265
* Updated -help message in clang-check.Alexander Kornienko2012-07-121-22/+33
| | | | | | | | | | | | | | | | Summary: Provide more information on usage in -help Test Plan: ran once Reviewers: klimek, chandlerc, djasper Reviewed By: klimek CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D5 llvm-svn: 160132
* Fix usage instructions for clang-check.Daniel Jasper2012-07-111-5/+5
| | | | llvm-svn: 160048
* Adds support for auto-detection of compilation databases, looking in a ↵Arnaud A. de Grandmaison2012-07-101-2/+3
| | | | | | directory and all its parents. llvm-svn: 159998
* Adds support for auto-detection of compilation databasesManuel Klimek2012-07-101-4/+10
| | | | | | | | | | from a source file and changes clang-check to make use of this. This makes clang-check just work on in-tree builds, and allows easy setup via a symlink per source directory to make clang-check work without any extra configuration. llvm-svn: 159990
* Remove a goofy CMake hack and use the standard CMake facilities toChandler Carruth2012-06-211-2/+5
| | | | | | | | | express library-level dependencies within Clang. This is no more verbose really, and plays nicer with the rest of the CMake facilities. It should also have no change in functionality. llvm-svn: 158888
* Fix a big layering violation introduced by r158771.Chandler Carruth2012-06-202-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | That commit added a new library just to hold the RawCommentList. I've started a discussion on the commit thread about whether that is really meritted -- it certainly doesn't seem necessary at this stage. However, the immediate problem is that the AST library has a hard dependency on the Comment library, but the dependencies were set up completely backward. In addition to the layering violation, this had an unfortunate effect if scattering the Comments library dependency throughout the build system, but inconsistently so -- several parts of the CMake dependencies were missing and only showed up due to transitive deps or the fact that the target wasn't being built by tho bots. It turns out that the Comments library can't (currently) be a well formed layer *below* the AST library either, as it has an API that accepts an ASTContext. That parameter is currently unused, so maybe that was a mistake? Anyways, it really seems like this is logically part of the AST -- that's the whole point of the ASTContext providing access to it as far as I can tell -- so I've merged it into the AST library to solve the immediate layering violation problems and remove some of the churn from our library dependencies. llvm-svn: 158807
* Structured comment parsing, first step.Dmitri Gribenko2012-06-202-2/+2
| | | | | | | | | * Retain comments in the AST * Serialize/deserialize comments * Find comments attached to a certain Decl * Expose raw comment text and SourceRange via libclang llvm-svn: 158771
* Adds a FixedCompilationDatabase to be able to specify tool parametersManuel Klimek2012-04-181-6/+10
| | | | | | at the command line. llvm-svn: 154989
* clangFrontend depends on clangEdit.Benjamin Kramer2012-04-041-1/+1
| | | | llvm-svn: 154010
* Adds a tooling library.Manuel Klimek2012-04-043-0/+91
Provides an API to run clang tools (FrontendActions) as standalone tools, or repeatedly in-memory in a process. This is useful for unit-testing, map-reduce style applications, source transformation daemons or command line tools. The ability to run over multiple translation units with different command line arguments enables building up refactoring tools that need to apply transformations across translation unit boundaries. See tools/clang-check/ClangCheck.cpp for an example. llvm-svn: 154008
OpenPOWER on IntegriCloud