summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert r163099 per chandlerc's request.Joao Matos2012-09-042-6/+0
| | | | llvm-svn: 163147
* Added a new cursor for SEHLeaveStmt to libclang.Joao Matos2012-09-032-0/+6
| | | | llvm-svn: 163099
* Implemented parsing and AST support for the MS __leave exception statement. ↵Joao Matos2012-09-021-0/+1
| | | | | | Also a minor fix to __except printing in StmtPrinter.cpp. Thanks to Aaron Ballman for review. llvm-svn: 163083
* [libclang] Fix indexing type alias declarations. rdar://11878406Argyrios Kyrtzidis2012-09-011-1/+1
| | | | llvm-svn: 163072
* [libclang] The annotation of tokens operation visits statement nodes ↵Argyrios Kyrtzidis2012-09-012-12/+81
| | | | | | | | | | | | | | code-recursively. This can blow the stack with extremely deep hierarchies. Switch it to data-recursive. This is implemented by introducing a post-children visitation callback that the CursorVisitor is calling after child nodes of a cursor have been visited. This is used by the annotate-tokens visitor to do extra work at that point. rdar://11979525. llvm-svn: 163071
* Split library clangRewrite into clangRewriteCore and clangRewriteFrontend.Ted Kremenek2012-09-012-5/+7
| | | | | | | This is similar to how we divide up the StaticAnalyzer libraries to separate core functionality to what is clearly associated with Frontend actions. llvm-svn: 163050
* Normalize line endings of r163013 (part 2).Joao Matos2012-08-312-19/+19
| | | | llvm-svn: 163032
* Normalize line endings of r163013.Joao Matos2012-08-311-935/+935
| | | | llvm-svn: 163024
* Improved MSVC __interface support by adding first class support for it, ↵Joao Matos2012-08-313-946/+954
| | | | | | instead of aliasing to "struct" which had some incorrect behaviour. Patch by David Robins. llvm-svn: 163013
* [libclang] When determining the cursor via a location, ignore synthesized ↵Argyrios Kyrtzidis2012-08-281-0/+10
| | | | | | | | | | | | | | | | ivars otherwise if we have something like: @synthesize prop = _prop; and '_prop' is not declared, we will encounter a '_prop' ivar before encountering the 'prop' synthesize declaration and we will think that we passed the region-of-interest, missing the cursor for 'prop'. rdar://12172700 llvm-svn: 162715
* [ms-inline asm] Rename getClobber to getClobberStringLiteral. No functionalChad Rosier2012-08-271-1/+1
| | | | | | change intended. llvm-svn: 162710
* [ms-inline asm] As part of a larger refactoring, rename AsmStmt to GCCAsmStmt.Chad Rosier2012-08-253-5/+5
| | | | | | No functional change intended. llvm-svn: 162632
* Fix a bunch of -Wdocumentation warnings.Dmitri Gribenko2012-08-231-2/+2
| | | | llvm-svn: 162452
* Attaching comments to declarations: find comment attached to any redeclarationDmitri Gribenko2012-08-111-3/+3
| | | | | | | | Not only look for the comment near the declaration itself, but also walk the redeclaration chain: the previous declaration might have had a documentation comment. llvm-svn: 161722
* 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-091-1/+3
| | | | | | inline assembly. llvm-svn: 161594
* 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-081-1/+2
| | | | llvm-svn: 161498
* 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
* libclang API for comment-to-xml conversion.Dmitri Gribenko2012-08-072-0/+389
| | | | | | | | | | | | 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
* 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-312-0/+116
| | | | | | | | | | 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
* Move comment from member operator() to class.Dmitri Gribenko2012-07-301-2/+2
| | | | llvm-svn: 160980
* 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
* libclang, examples: [CMake] Add dependencies to tblgen'd headers.NAKAMURA Takumi2012-07-271-0/+13
| | | | llvm-svn: 160849
* 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-232-21/+44
| | | | | | | | 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
* Add libclang APIs to walk comments ASTs and an API to convert a comment to anDmitri Gribenko2012-07-205-0/+745
| | | | | | | | | | | 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
* Move clang_Cursor_getBriefCommentText implementation under `extern "C"'.Dmitri Gribenko2012-07-171-2/+2
| | | | llvm-svn: 160331
* 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
* 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
* [libclang] CompilationDatabase naming and comment fixesArnaud A. de Grandmaison2012-07-032-21/+20
| | | | llvm-svn: 159682
* [libclang] Introduce clang_Cursor_isDynamicCall which,Argyrios Kyrtzidis2012-07-022-1/+27
| | | | | | | | | | | | | given a cursor pointing to a C++ method call or an ObjC message, returns non-zero if the method/message is "dynamic", meaning: For a C++ method: the call is virtual. For an ObjC message: the receiver is an object instance, not 'super' or a specific class. rdar://11779185 llvm-svn: 159627
* Add a new libclang completion API to get brief documentation comment that isDmitri Gribenko2012-07-024-6/+29
| | | | | | | | | | | | | | | | attached to a declaration in the completion string. Since extracting comments isn't free, a new code completion option is introduced. A new code completion option that enables including brief comments into CodeCompletionString should be a, err, code completion option. But because ASTUnit caches global declarations during parsing before even completion consumer is created, the option is duplicated as a translation unit option (in both libclang and ASTUnit, like the option to cache code completion results). llvm-svn: 159539
* [libclang] Make implementation filename match the header's name for ↵Arnaud A. de Grandmaison2012-06-302-1/+1
| | | | | | CXCompilationDatabase llvm-svn: 159493
* [libclang] Fix autoconf library dependencies for tooling supportArnaud A. de Grandmaison2012-06-301-1/+1
| | | | llvm-svn: 159490
* [libclang] add CompilationDatabase supportArnaud A. de Grandmaison2012-06-303-0/+141
| | | | llvm-svn: 159484
* [libclang] Don't bind a StringRef to a temporary std::string object.Argyrios Kyrtzidis2012-06-281-2/+1
| | | | | | | | It may end up pointing at garbage. Fixes the MSVC debug build. rdar://11703319 llvm-svn: 159377
* Remove redundant check.Dmitri Gribenko2012-06-281-1/+1
| | | | llvm-svn: 159355
* Implement a lexer for structured comments.Dmitri Gribenko2012-06-262-0/+19
| | | | llvm-svn: 159223
* Remove a goofy CMake hack and use the standard CMake facilities toChandler Carruth2012-06-211-12/+15
| | | | | | | | | 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
OpenPOWER on IntegriCloud