summaryrefslogtreecommitdiffstats
path: root/clang/tools/diagtool
Commit message (Collapse)AuthorAgeFilesLines
...
* [CMake] Update target_link_libraries() and LLVM_LINK_COMPONENTS for each ↵NAKAMURA Takumi2013-12-101-7/+1
| | | | | | CMakeLists.txt. llvm-svn: 196916
* Rather than duplicating extension diagnostics to allow them to cause aRichard Smith2013-11-121-2/+1
| | | | | | | | | | substitution failure, allow a flag to be set on the Diagnostic object, to mark it as 'causes substitution failure'. Refactor Diagnostic.td and the tablegen to use an enum for SFINAE behavior rather than a bunch of flags. llvm-svn: 194444
* Move individual group name strings from the OptionTable into one big char ↵Craig Topper2013-08-293-9/+9
| | | | | | array. Then only store offsets into it in the OptionTable. Saves about 4K from the clang binary and removes 400 relocation entries from DiagnosticIDs.o. llvm-svn: 189568
* Reorder and shrink size of NameLen field in diagnostic group table. Shaves ↵Craig Topper2013-08-282-5/+7
| | | | | | ~4K from clang binary. llvm-svn: 189445
* Merge diagnostic group tables to reduce data size and relocation entries.Craig Topper2013-08-282-15/+23
| | | | | | | | The individual group and subgroups tables are now two large tables. The option table stores an index into these two tables instead of pointers. This reduces the size of the options tabe since it doesn't need to store pointers. It also reduces the number of relocations needed. My build shows this reducing DiagnosticsIDs.o and the clang binary by ~20.5K. It also removes ~400 relocation entries from DiagnosticIDs.o. llvm-svn: 189438
* [Driver] Refactor clang driver to use LLVM's Option libraryReid Kleckner2013-06-141-1/+1
| | | | | | | | | | | | | | | | | | 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
* Nuke SetUpBuildDumpLog.Sean Silva2013-01-201-2/+1
| | | | | | | Also, it was the only reason that `argc` and `argv` were being passed into createDiagnostics, so remove those parameters and clean up callers. llvm-svn: 172945
* these now depend on the bitcode reader too.Chris Lattner2013-01-192-1/+2
| | | | llvm-svn: 172906
* Sort #include lines for tools/...Chandler Carruth2012-12-044-9/+9
| | | | | | Completely automated with sort_includes.py llvm-svn: 169240
* Make DiagnosticOptions intrusively reference-counted, and make sureDouglas Gregor2012-10-232-3/+6
| | | | | | | the various stakeholders bump up the reference count. In particular, the diagnostics engine now keeps the DiagnosticOptions object alive. llvm-svn: 166508
* Add color output to 'diagtool tree' to show what warnings are enabled by ↵Ted Kremenek2012-10-051-3/+45
| | | | | | default. llvm-svn: 165338
* [ms-inline asm] Add various MC components to clang build to support MS-style ↵Chad Rosier2012-08-091-1/+4
| | | | | | inline assembly. llvm-svn: 161594
* Add various MC components to clang build to support MS-style inline assembly.Chad Rosier2012-08-081-2/+2
| | | | llvm-svn: 161498
* Include clang-check as part of the clang installation.David Blaikie2012-07-311-3/+0
| | | | | | | | | | 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
* Enable comment parsing and semantic analysis to emit diagnostics. A fewDmitri Gribenko2012-07-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | diagnostics implemented -- see testcases. I created a new TableGen file for comment diagnostics, DiagnosticCommentKinds.td, because comment diagnostics don't logically fit into AST diagnostics file. But I don't feel strongly about it. This also implements support for self-closing HTML tags in comment lexer and parser (for example, <br />). In order to issue precise diagnostics CommentSema needs to know the declaration the comment is attached to. There is no easy way to find a decl by comment, so we match comments and decls in lockstep: after parsing one declgroup we check if we have any new, not yet attached comments. If we do -- then we do the usual comment-finding process. It is interesting that this automatically handles trailing comments. We pick up not only comments that precede the declaration, but also comments that *follow* the declaration -- thanks to the lookahead in the lexer: after parsing the declgroup we've consumed the semicolon and looked ahead through comments. Added -Wdocumentation-html flag for semantic HTML errors to allow the user to disable only HTML warnings (but not HTML parse errors, which we emit as warnings in -Wdocumentation). llvm-svn: 160078
* Enhance 'diagtool list-warnings' to report number of diagnostics covered ↵Ted Kremenek2012-07-071-0/+4
| | | | | | directly under -Wpedantic, and enhance warning-flags.c test to test that this set does not grow. llvm-svn: 159893
* [diagtool] Appease buildbots by explicitly using makeArrayRef.Jordan Rose2012-06-241-2/+2
| | | | llvm-svn: 159095
* [diagtool] Add a new "tree" command to shows warnings activated by a flag.Jordan Rose2012-06-246-18/+307
| | | | | | | | | | | | | | | | % diagtool tree -Wunused-value -Wunused-value -Wunused-comparison warn_unused_comparison -Wunused-result warn_unused_result warn_unused_call warn_unused_container_subscript_expr warn_unused_expr warn_unused_property_expr warn_unused_voidptr llvm-svn: 159093
* [diagtool] Write to llvm::outs() by default instead of llvm::errs()Jordan Rose2012-06-221-1/+1
| | | | llvm-svn: 158954
* Remove a goofy CMake hack and use the standard CMake facilities toChandler Carruth2012-06-211-7/+7
| | | | | | | | | 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-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix cmake build.Rafael Espindola2012-06-201-1/+0
| | | | llvm-svn: 158782
* Structured comment parsing, first step.Dmitri Gribenko2012-06-202-1/+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
* diagtool/CMakeLists.txt: Add missing tblgen'd dependency, ↵NAKAMURA Takumi2012-06-171-0/+4
| | | | | | ClangDiagnosticIndexName. llvm-svn: 158649
* [diagtool] Properly order libraries in Makefile for buildbot.Jordan Rose2012-06-041-3/+3
| | | | llvm-svn: 157934
* [diagtool] Re-add show-enabled, minimizing the code pulled in from Frontend.Jordan Rose2012-06-046-27/+211
| | | | | | Now correctly builds with both GNU make and CMake. llvm-svn: 157932
* [diagtool] Pull show-enabled back out for now.Jordan Rose2012-06-016-218/+27
| | | | | | | Need to figure out how to get Frontend's warning parsing without bringing in all of Frontend. llvm-svn: 157847
* [diagtool] Unbork Makefile build.Jordan Rose2012-06-011-2/+9
| | | | llvm-svn: 157846
* [diagtool] Appease buildbot by adding llvm_unreachable.Jordan Rose2012-06-011-0/+2
| | | | llvm-svn: 157843
* [diagtool] Add 'show-enabled', which displays which warnings are enabled.Jordan Rose2012-06-016-26/+208
| | | | | | | show-enabled uses the command line you give it to build a CompilerInstance, so any flags you pass will be processed as if running clang proper. llvm-svn: 157842
* [diagtool] The driver skips two arguments, not one.Jordan Rose2012-06-011-1/+1
| | | | llvm-svn: 157841
* Provide common include for all diagnostic headers.David Blaikie2012-02-151-19/+1
| | | | | | Reviewed by Ted Kremenek. llvm-svn: 150616
* Remove the unuseful -fdiagnostics-show-nameDavid Blaikie2012-02-151-7/+45
| | | | | | | | | | | | | | This option was added in r129614 and doesn't have any use case that I'm aware of. It's possible that external tools are using these names - and if that's the case we can certainly reassess the functionality, but for now it lets us shave out a few unneeded bits from clang. Move the "StaticDiagNameIndex" table into the only remaining consumer, diagtool. This removes the actual diagnostic name strings from clang entirely. Reviewed by Chris Lattner & Ted Kremenek. llvm-svn: 150612
* Reduce dependencies.Benjamin Kramer2011-10-231-3/+2
| | | | llvm-svn: 142742
* Rename Diagnostic to DiagnosticsEngine as per issue 5397David Blaikie2011-09-251-1/+1
| | | | llvm-svn: 140478
* The diagtool registration system tries to use a global variable from a methodNick Lewycky2011-08-124-7/+8
| | | | | | | called on another global variable. Use ManagedStatic to ensure that the global we register with actually exists when we need it. llvm-svn: 137406
* Add libsupport to list of libraries to link into diagtoolTed Kremenek2011-08-091-0/+4
| | | | llvm-svn: 137110
* Add 'diagtool' to the 'tools/' directory. diagtool is a new tool (WIP) for ↵Ted Kremenek2011-08-096-0/+314
analyzing and working with clang diagnostics. Some interesting stats from 'diagtool list-warnings' on the current version of clang: Percentage of warnings with flags: 48.79% Number of unique flags: 148 Average number of diagnostics per flag: 2.041 llvm-svn: 137109
OpenPOWER on IntegriCloud