summaryrefslogtreecommitdiffstats
path: root/clang/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* Make all of the tools build in parallel. Missing this caused incrementalChandler Carruth2012-08-091-3/+6
| | | | | | | | | rebuilds to serially link each tool, which is really really slow. We still have to build libclang serially first because c-index-test depends on it. llvm-svn: 161612
* Recurse into the extra tools repo the correct way from the MakefileChandler Carruth2012-08-091-2/+5
| | | | | | | build system. Thanks to Nick for pointing at the actual construct which should be used here. llvm-svn: 161609
* Comment to HTML and XML conversion: ignore commands that contain a declarationDmitri Gribenko2012-08-091-1/+7
| | | | | | as their argument. For example, \fn, \function, \typedef, \method, \class etc. llvm-svn: 161601
* Comment to HTML and XML conversion: use CommandTraits to classify commands.Dmitri Gribenko2012-08-091-5/+9
| | | | | | | This also fixes a bug in comment to XML conversion: \result was just an ordinary paragraph, not an alias for \returns. llvm-svn: 161596
* [ms-inline asm] Add various MC components to clang build to support MS-style ↵Chad Rosier2012-08-094-3/+17
| | | | | | inline assembly. llvm-svn: 161594
* Allow the Makefile build system to find the extra repo if it is checkedChandler Carruth2012-08-091-1/+2
| | | | | | | | | | out. Unfortunately, the existing makefiles for the extra repo don't specify the correct library dependencies. Fixing that next. If you're following along, you'll get linker errors. llvm-svn: 161549
* Comment XML: use xml:space="preserve" in Verbatim tags, so that XML tidy doesDmitri Gribenko2012-08-081-3/+3
| | | | | | not compress spaces in verbatim content. llvm-svn: 161531
* Add various MC components to clang build to support MS-style inline assembly.Chad Rosier2012-08-084-5/+8
| | | | llvm-svn: 161498
* Teach ccc-analyze about -fobjc-legacy-dispatch and -mios-simulator-version-minTed Kremenek2012-08-071-0/+2
| | | | llvm-svn: 161443
* Comment AST: DeclInfo: add a special kind for enums.Dmitri Gribenko2012-08-071-0/+4
| | | | | | Comment XML: add a root node kind for enums. llvm-svn: 161442
* c-index-test Makefile: fix build on Linux. Reviewed by Eric Christopher.Dmitri Gribenko2012-08-071-2/+2
| | | | llvm-svn: 161439
* libclang API for comment-to-xml conversion.Dmitri Gribenko2012-08-075-25/+528
| | | | | | | | | | | | The implementation also includes a Relax NG schema and tests for the schema itself. The schema is used in c-index-test to verify that XML documents we produce are valid. In order to do the validation, we add an optional libxml2 dependency for c-index-test. Credits for CMake part go to Doug Gregor. Credits for Autoconf part go to Eric Christopher. Thanks! llvm-svn: 161431
* Initial support for recursing into the new clang-tools-extra repositoryChandler Carruth2012-08-071-0/+9
| | | | | | | | | if checked out under clang/tools/extra. This is mostly so folks other than me can start to test. Documentation, details, and an announcement are still in the works. llvm-svn: 161405
* scan-build: factor out setting of environment variables.Ted Kremenek2012-08-061-34/+59
| | | | llvm-svn: 161343
* Pull 'xcodebuild' wrapper logic into a separate function.Ted Kremenek2012-08-061-26/+38
| | | | llvm-svn: 161330
* Comment to HTML conversion: correct typo in CSS class name: taram -> tparamDmitri Gribenko2012-08-011-2/+2
| | | | llvm-svn: 161145
* Comment to HTML conversion: refactor. Extracted a class to for FullCommentDmitri Gribenko2012-08-011-122/+137
| | | | | | semantic parts -- this will be reused for comment to XML conversion. llvm-svn: 161139
* Comment to HTML conversion: skip \tparam commands with whitespace paragraphsDmitri Gribenko2012-08-011-0/+3
| | | | llvm-svn: 161096
* Comment to HTML conversion: escape HTML special characters in command argumentsDmitri Gribenko2012-08-011-7/+17
| | | | llvm-svn: 161094
* Comment parsing: add support for \tparam command on all levels.Dmitri Gribenko2012-07-313-0/+133
| | | | | | | | | | The only caveat is renumbering CXCommentKind enum for aesthetic reasons -- this breaks libclang binary compatibility, but should not be a problem since API is so new. This also fixes PR13372 as a side-effect. llvm-svn: 161087
* Include clang-check as part of the clang installation.David Blaikie2012-07-315-6/+6
| | | | | | | | | | 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
* Move comment from member operator() to class.Dmitri Gribenko2012-07-301-2/+2
| | | | llvm-svn: 160980
* c-index-test: remove dead store. Found by Clang static analyzer!Dmitri Gribenko2012-07-301-1/+0
| | | | llvm-svn: 160974
* Add missing include for Linux buildbotDmitri Gribenko2012-07-301-0/+2
| | | | llvm-svn: 160971
* Add an assert to ParamCommandComment::getParamIndex() -- it should not beDmitri Gribenko2012-07-301-4/+11
| | | | | | called unless index is valid. llvm-svn: 160970
* [scan-build] Fix clang++ pathnameArnaud A. de Grandmaison2012-07-271-1/+3
| | | | llvm-svn: 160871
* libclang, examples: [CMake] Add dependencies to tblgen'd headers.NAKAMURA Takumi2012-07-271-0/+13
| | | | llvm-svn: 160849
* Removed standalone clang-ast-dump tool.Alexander Kornienko2012-07-265-174/+1
| | | | llvm-svn: 160772
* libclang comment to HTML rendering: \result is the same as \returnsDmitri Gribenko2012-07-251-1/+2
| | | | llvm-svn: 160738
* libclang comments AST: clang_ParamCommandComment_getParamName: don't assertDmitri Gribenko2012-07-231-1/+1
| | | | | | | when a \param command does not have a parameter name, just return an empty string instead. llvm-svn: 160638
* Comment AST: add InlineContentComment::RenderKind to specify a defaultDmitri Gribenko2012-07-233-21/+58
| | | | | | | | rendering mode for clients that don't want to interpret Doxygen commands. Also add a libclang API to query this information. llvm-svn: 160633
* Comment to HTML conversion: add more CSS classes to identify function argumentsDmitri Gribenko2012-07-211-67/+66
| | | | | | | by index. This is useful if the user does not document all arguments, and we can't find a particular argument by index via :nth-of-type() CSS selector. llvm-svn: 160595
* Fix c-index-test to compile as C89.Dmitri Gribenko2012-07-201-8/+14
| | | | llvm-svn: 160582
* Add libclang APIs to walk comments ASTs and an API to convert a comment to anDmitri Gribenko2012-07-206-21/+947
| | | | | | | | | | | HTML fragment. For testing, c-index-test now has even more output: * HTML rendering of a comment * comment AST tree dump in S-expressions like Comment::dump(), but implemented * with libclang APIs. llvm-svn: 160577
* CMake: clang should depend on clang-headers, or bin/clang would not work better.NAKAMURA Takumi2012-07-201-0/+2
| | | | llvm-svn: 160549
* [Win32] Rework crash-report since r145389.NAKAMURA Takumi2012-07-171-0/+8
| | | | | | | | | | | - lib/Driver/Driver.cpp, tools/driver/driver.cpp: Exit status should not be propagated, although clang driver should catch exceptions. - test/Driver/crash-report.c: Add REQUIRES:shell for now. FIXME: setenv should work also on Lit.InternalShellRunner. - test/Driver/crash-report.c: Remove XFAIL. Thanks to Chad, To point out the issue. llvm-svn: 160343
* Move clang_Cursor_getBriefCommentText implementation under `extern "C"'.Dmitri Gribenko2012-07-171-2/+2
| | | | llvm-svn: 160331
* Add hack (provided by Jonathan Sauer) to fall back to assuming Xcode is ↵Ted Kremenek2012-07-161-1/+5
| | | | | | | | | | installed in /Developer when using Python < 2.7.0. This is the case on Snow Leopard, where the tools are always installed in /Developer. This isn't a proper fix for really figuring out where Xcode is installed, but should work to fix an obvious problem on Snow Leopard. llvm-svn: 160321
* The new clang-ast-dump tool for selective AST dumping. Moved common ↵Alexander Kornienko2012-07-166-57/+192
| | | | | | 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
* 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
* Introduce a flag in SourceManager to treat non-system source filesArgyrios Kyrtzidis2012-07-112-3/+8
| | | | | | | | | | | | | | | | | | | | as "volatile", meaning there's a high enough chance that they may change while we are trying to use them. This flag is only enabled by libclang. Currently "volatile" source files will be stat'ed immediately before opening them, because the file size stat info may not be accurate since when we got it (e.g. from the PCH). This avoids crashes when trying to reference mmap'ed memory from a file whose size is not what we expect. Note that there's still a window for a racing issue to occur but the window for it should be way smaller than before. We can consider later on to avoid mmap completely on such files. rdar://11612916 llvm-svn: 160074
* 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
* 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
* Re-apply r159875 with fixes.Ted Kremenek2012-07-071-6/+1
| | | | | | | - Split pedantic driver flag test into separate test file, and XFAIL on cygwin,mingw32 - Fix bug in tablegen logic where a missing '{' caused errors to be included in -Wpedantic. llvm-svn: 159892
* Revert rr159875, "Implement -Wpedantic and --no-pedantic to complement ↵NAKAMURA Takumi2012-07-071-1/+6
| | | | | | | | | | -Weverything." It broke several builds. I suspect FileCheck might match assertion failure, even if clang/test/Misc/warning-flags.c passed the test. > 0. Program arguments: bin/./clang -### -pedantic -Wpedantic clang/test/Driver/warning-options.cpp llvm-svn: 159886
* Implement -Wpedantic and --no-pedantic to complement -Weverything.Ted Kremenek2012-07-061-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces some magic in tablegen to create a "Pedantic" diagnostic group which automagically includes all warnings that are extensions. This allows a user to suppress specific warnings traditionally under -pedantic used an ordinary warning flag. This also allows users to use #pragma to silence specific -pedantic warnings, or promote them to errors, within blocks of text (just like any other warning). -Wpedantic is NOT an alias for -pedantic. Instead, it provides another way to (a) activate -pedantic warnings and (b) disable them. Where they differ is that -pedantic changes the behavior of the preprocessor slightly, whereas -Wpedantic does not (it just turns on the warnings). The magic in the tablegen diagnostic emitter has to do with computing the minimal set of diagnostic groups and diagnostics that should go into -Wpedantic, as those diagnostics that already members of groups that themselves are (transitively) members of -Wpedantic do not need to be included in the Pedantic group directly. I went back and forth on whether or not to magically generate this group, and the invariant was that we always wanted extension warnings to be included in -Wpedantic "some how", but the bookkeeping would be very onerous to manage by hand. -no-pedantic (and --no-pedantic) is included for completeness, and matches many of the same kind of flags the compiler already supports. It does what it says: cancels out -pedantic. One discrepancy is that if one specifies --no-pedantic and -Weverything or -Wpedantic the pedantic warnings are still enabled (essentially the -W flags win). We can debate the correct behavior here. Along the way, this patch nukes some code in TextDiagnosticPrinter.cpp and CXStoredDiagnostic.cpp that determine whether to include the "-pedantic" flag in the warning output. This is no longer needed, as all extensions now have a -W flag. This patch also significantly reduces the number of warnings not under flags from 229 to 158 (all extension warnings). That's a 31% reduction. llvm-svn: 159875
* Fix some memory leaks found by the static analyzer. Thanks to John Smith for ↵Richard Smith2012-07-051-3/+8
| | | | | | running it over Clang. llvm-svn: 159732
OpenPOWER on IntegriCloud