summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang
Commit message (Collapse)AuthorAgeFilesLines
...
* libclang: use getCursorTU and getCursorASTUnit instead of explicit castsDmitri Gribenko2013-01-114-8/+5
| | | | llvm-svn: 172241
* Replace more usages of __func__ with LLVM_FUNCTION_NAMEDmitri Gribenko2013-01-112-2/+4
| | | | llvm-svn: 172161
* libclang logging: fixup for MSVC, which does not have __func__Dmitri Gribenko2013-01-111-1/+2
| | | | llvm-svn: 172158
* [libclang] Address some coding style issues pointed out by Dmitri.Argyrios Kyrtzidis2013-01-101-2/+3
| | | | llvm-svn: 172096
* [libclang] Add missing header fileArgyrios Kyrtzidis2013-01-101-0/+95
| | | | llvm-svn: 172090
* [libclang] Enhance logging capabilities of libclang.Argyrios Kyrtzidis2013-01-105-37/+176
| | | | | | | | | -provide a "raw_ostream'ish" class to make it convenient to output logging info. -use macros to automate a bit the logging functionality inside libclang functions -when logging, print a stack trace if "LIBCLANG_LOGGING=2" environment is set. -add logging to more functions. llvm-svn: 172089
* [libclang] In clang_equalCursors, clear out the "FirstInDeclGroup" part in a ↵Argyrios Kyrtzidis2013-01-081-0/+12
| | | | | | | | | | | declaration cursor before doing the comparison. This is because we can't set "FirstInDeclGroup" consistently; for example, when visiting a DeclStmt we will set it but we don't set it on the result of clang_getCursorDefinition for a reference of the same declaration. llvm-svn: 171878
* [libclang] When annotating preprocessor tokens, if we are in a macro definition,Argyrios Kyrtzidis2013-01-071-1/+31
| | | | | | check if the token was ever a macro name and annotate it if that's the case. llvm-svn: 171776
* [libclang] Simplify annotation of preprocessing tokens and remove the ↵Argyrios Kyrtzidis2013-01-071-82/+63
| | | | | | | | | | | | AnnotateTokensData DenseMap and the lookups associated with it. Instead of lexing for preprocessor tokens, associating the annotation with the location in a map, and later lookup in the map in order to adjust the cursor annotation, just annotate the cursor while lexing for preprocessor tokens. llvm-svn: 171775
* [libclang] Make token annotation of type/storage qualifiers accurate.Argyrios Kyrtzidis2013-01-071-17/+0
| | | | | | | | Previously type/storage qualifiers would not be annotated as the declaration they belonged to. Just use the resulting source range of getRawCursorExtent() which is more correct than what AnnotateTokensWorker::Visit() was adjusting it to. llvm-svn: 171774
* [libclang] When getting the cursor for an identifier inside a macro ↵Argyrios Kyrtzidis2013-01-075-13/+210
| | | | | | | | | | | | | | | definition, check if this was ever a macro name and return a specific CXCursor_MacroExpansion cursor in such a case, instead of the generic CXCursor_MacroDefinition. Checking for macro name makes sure the identifier is not part of the identifier list in a function macro. While, in general, resolving identifiers in macro definitions to other macros may not be completely accurate, it greatly improves functionality such as give-me-the-definition-of-this, which was not working at all inside macro definitions. llvm-svn: 171773
* Comment to XML conversion: no, we don't want to print instantiations for theDmitri Gribenko2013-01-071-1/+1
| | | | | | <Declaration> tag llvm-svn: 171763
* libclang/Makefile: Reorder USEDLIBS along driver/clang.NAKAMURA Takumi2013-01-071-4/+6
| | | | llvm-svn: 171750
* [libclang] Introduce clang_getFileLocation.Argyrios Kyrtzidis2013-01-042-1/+39
| | | | | | | | | Uses of clang_getSpellingLocation should eventually move to calling clang_getFileLocation, and clang_getSpellingLocation should do what its name represents and actually point at the 'spelling' location, e.g. inside a macro definition if the spelling of a token came from that. llvm-svn: 171486
* Re-sort #include lines using the llvm/utils/sort_includes.py script.Chandler Carruth2013-01-023-5/+4
| | | | | | | Removes a duplicate #include as well as cleaning up some sort order regressions since I last ran the script over Clang. llvm-svn: 171364
* Add intel_ocl_bicc calling convention as a function attribute to clang. The ↵Guy Benyei2012-12-251-0/+1
| | | | | | calling convention is already implemented in LLVM. llvm-svn: 171056
* [libclang] Check for the 'LIBCLANG_NOTHREADS' environment variable before ↵Argyrios Kyrtzidis2012-12-221-0/+6
| | | | | | | | creating a separate thread for code-completion. llvm-svn: 170978
* Add objective-C style formatting to clang format andFariborz Jahanian2012-12-201-6/+0
| | | | | | | use it to format xml declaration tags. // rdar://12378714 llvm-svn: 170727
* Revert r170500. It over-zealously converted *ALL* things named Attributes, ↵Bill Wendling2012-12-201-1/+1
| | | | | | which is wrong here. llvm-svn: 170721
* Audit DeclPrinter with -ast-dump on Cocoa.h andFariborz Jahanian2012-12-191-1/+1
| | | | | | | | | fix any bad objectiveC syntax coming out of DeclPrinter. This is on going. Also, introduce a new PrintPolicy and use it as needed when declaration tag is to be produced via DeclPrinter. llvm-svn: 170606
* Add a missing 'else'. Found by grep '} if'Dmitri Gribenko2012-12-191-1/+1
| | | | | | | No testcase because this did not affect correctness: a declaration can only be ClassTemplateDecl or a FunctionTemplateDecl, not both. llvm-svn: 170565
* Improve on header comment suggested by James Dennet.Fariborz Jahanian2012-12-191-2/+2
| | | | llvm-svn: 170555
* Rename the 'Attributes' class to 'Attribute'. It's going to represent a ↵Bill Wendling2012-12-191-1/+1
| | | | | | single attribute in the future. llvm-svn: 170500
* Simplify logic to use SourceManager::getFileLoc(), per Argyrios's feedback.Ted Kremenek2012-12-191-8/+1
| | | | llvm-svn: 170487
* fixes a doxygen comment.Fariborz Jahanian2012-12-191-1/+3
| | | | llvm-svn: 170485
* Increas number of iterations before a new libclang format objectFariborz Jahanian2012-12-191-1/+1
| | | | | | is created to 1000. llvm-svn: 170481
* Some code refactoring per Dimitri's comment.Fariborz Jahanian2012-12-192-41/+40
| | | | llvm-svn: 170478
* Have clang_getSpellingLocation() use the same logic as DiagnosticRenderer ↵Ted Kremenek2012-12-181-8/+6
| | | | | | | | | | | | for plowing through macros. This fixes a subtle bug reported in <rdar://problem/12584554> where a double-nested macro could lead to an incorrect fixit location with live issues. This fix also uncovers a bunch of subtle bugs in our indexer test cases which are now fixed (mostly around source ranges for attributes). llvm-svn: 170468
* This is the libclang patch providing minimal API toFariborz Jahanian2012-12-186-5/+153
| | | | | | | | | | use clang's formatter. Currently, formatter is used to format declaration tags for xml comments. Since formatter is in flux and its change will break several of the clang comment tests, only a single tests is formatted using this facility. Doug has reviewed and approved it for check-in. llvm-svn: 170467
* Re-commit r170428 changes with Linux style file endings.Guy Benyei2012-12-182-0/+12
| | | | | | Add OpenCL images as clang builtin types. llvm-svn: 170432
* Revert changes from r170428, as I accidentally changed the line endings of ↵Guy Benyei2012-12-182-7087/+7075
| | | | | | these files to Windows style. llvm-svn: 170431
* Add OpenCL images as clang builtin types.Guy Benyei2012-12-182-7075/+7087
| | | | llvm-svn: 170428
* [libclang] Make sure tokens from preprocessor directives are annotated as such,Argyrios Kyrtzidis2012-12-121-10/+5
| | | | | | | | even if the directive is inside a declaration. Fixes rdar://11548788 & http://llvm.org/PR12970 llvm-svn: 169949
* [libclang] Declarations inside anonymous namespaces have internal linkage soArgyrios Kyrtzidis2012-12-071-7/+1
| | | | | | | | | their USR should contain a location. This uniques them from other declarations with the same name but in different translation units. rdar://10546541 llvm-svn: 169647
* [libclang] Introduce a new indexing mode where we skip function bodiesArgyrios Kyrtzidis2012-12-063-18/+299
| | | | | | | | | | | | | | | that were already parsed in the same "indexing session". An indexing session is defined as using the same CXIndexAction object for multiple clang_indexSourceFile calls. Passing CXIndexOpt_SkipParsedBodiesInSession as an indexing option will enable the mode where we try to skip bodies that were already parsed in another translation unit. If a function's body was skipped, the "flags" field in the CXIdxDeclInfo structure will have "CXIdxDeclFlag_Skipped" bit was set. llvm-svn: 169539
* libclang: Add a function to libclang for retrieving the bit width valueDmitri Gribenko2012-12-042-0/+16
| | | | | | Patch by Jyun-Yan You. llvm-svn: 169276
* Sort #include lines for tools/...Chandler Carruth2012-12-0422-72/+54
| | | | | | Completely automated with sort_includes.py llvm-svn: 169240
* [libclang] Avoid copying the CompileCommand related strings when wrapping ↵Argyrios Kyrtzidis2012-12-041-2/+2
| | | | | | them to a CXString. llvm-svn: 169227
* Introduce CompilationDatabase::getAllCompileCommands() that returns allArgyrios Kyrtzidis2012-12-042-0/+12
| | | | | | compile commands of the database and expose it via the libclang API. llvm-svn: 169226
* [libclang] Remove WorkingDir field from CIndexer, it has been rendered useless.Argyrios Kyrtzidis2012-11-272-5/+0
| | | | | | No functionality change. llvm-svn: 168738
* Make helpers static/anonymous.Benjamin Kramer2012-11-221-1/+4
| | | | llvm-svn: 168500
* Revert r167801, "[preprocessor] When #including something that contributes noDaniel Dunbar2012-11-131-2/+0
| | | | | | tokens at all,". This change broke External/Nurbs in LLVM test-suite. llvm-svn: 167858
* [preprocessor] When #including something that contributes no tokens at all,Argyrios Kyrtzidis2012-11-131-0/+2
| | | | | | | | | don't recursively continue lexing. This avoids a stack overflow with a sequence of many empty #includes. rdar://11988695 llvm-svn: 167801
* Remove completely irrelevant code from USR generation.Ted Kremenek2012-11-061-29/+4
| | | | | | | | | | | | | | Thanks to Richard Smith for pointing this out. This code stopped serving its purpose during r103212 in a refactoring. My initial fix was to add back the logic to abort the USR generation for InternalLinkage, but enough tests broke suspiciously that I fear that USR generation for cursors with InternalLinkage is now expected by some clients (where it wasn't the case when the refactoring took place). I don't own this code anymore and have not looked at it for some time, but clearly this code is dead and can be removed pending further review on the proper logic here. llvm-svn: 167442
* [libclang] Introduce clang_Cursor_getReceiverType which returns the CXType forArgyrios Kyrtzidis2012-11-012-0/+14
| | | | | | | | the receiver of an ObjC message expression. rdar://12578643 llvm-svn: 167201
* Add missing emacs major mode marker.Nick Lewycky2012-10-291-1/+1
| | | | llvm-svn: 166914
* Fix name of this file.Nick Lewycky2012-10-291-1/+1
| | | | llvm-svn: 166913
* Add missing emacs major mode marker.Nick Lewycky2012-10-291-1/+1
| | | | llvm-svn: 166912
* Comment to XML conversion: avoid memory allocation while pretty-printing theDmitri Gribenko2012-10-251-18/+22
| | | | | | declaration. llvm-svn: 166707
* Make DiagnosticOptions intrusively reference-counted, and make sureDouglas Gregor2012-10-234-14/+18
| | | | | | | the various stakeholders bump up the reference count. In particular, the diagnostics engine now keeps the DiagnosticOptions object alive. llvm-svn: 166508
OpenPOWER on IntegriCloud