summaryrefslogtreecommitdiffstats
path: root/clang/tools
Commit message (Collapse)AuthorAgeFilesLines
* Add 'clang_getCursorLanguage' to return the "language" of the AST element ↵Ted Kremenek2010-04-122-0/+64
| | | | | | (e.g., distinguish between C and Objective-C language features). Currently this only returns results for declarations. llvm-svn: 101070
* Sort exports file.Ted Kremenek2010-04-121-3/+3
| | | | llvm-svn: 101069
* Prune includes.Benjamin Kramer2010-04-129-17/+22
| | | | llvm-svn: 101059
* Add initial USR support for macro definitions.Ted Kremenek2010-04-111-1/+11
| | | | llvm-svn: 100997
* Augment clang_getCursorUSR() to not always expect that clang_getCursorDecl() ↵Ted Kremenek2010-04-111-5/+11
| | | | | | | | does the right thing if the cursor is not a decl (such as in the case of macros). llvm-svn: 100996
* Add CIndex support for blocks.Ted Kremenek2010-04-111-2/+19
| | | | llvm-svn: 100989
* CIndex: move extractUSRSuffix out of extern "C" and simplify it.Benjamin Kramer2010-04-081-6/+4
| | | | llvm-svn: 100773
* Fronted: Kill overly specialized RecordLayoutDumper, just make ↵Daniel Dunbar2010-04-081-1/+0
| | | | | | -dump-record-layouts a bit that Sema honors. llvm-svn: 100747
* update for api change.Chris Lattner2010-04-071-1/+1
| | | | llvm-svn: 100718
* Fix CIndex crash on invalid code reported in <rdar://problem/7833619>.Ted Kremenek2010-04-071-2/+3
| | | | llvm-svn: 100589
* Fix ccc-analyzer's handling of quoted arguments in the build command. Fixes ↵Ted Kremenek2010-04-061-6/+1
| | | | | | PR 6791.[B llvm-svn: 100551
* reduce indentation, tidy.Chris Lattner2010-04-061-1/+1
| | | | llvm-svn: 100537
* Make Diagnostic reference-counted, which is simpler than jugglingDouglas Gregor2010-04-052-5/+6
| | | | | | maybe-ownership vs. ownership. llvm-svn: 100498
* inline in MC assembly parsers. clang -integrated-as nowChris Lattner2010-04-051-0/+1
| | | | | | works with inline asm! llvm-svn: 100493
* Match MemoryBuffer API changes.Chris Lattner2010-04-051-3/+2
| | | | llvm-svn: 100484
* Clarify the ownership semantics of the Diagnostic object used byDouglas Gregor2010-04-051-9/+5
| | | | | | | | | ASTUnit. Previously, we would end up with use-after-free errors because the Diagnostic object would be creating in one place (say, CIndex) and its ownership would not be transferred into the ASTUnit. Fixes <rdar://problem/7818608>. llvm-svn: 100464
* Minor ASTUnit cleanups:Douglas Gregor2010-04-052-6/+6
| | | | | | | | - Rename "Diagnostics" and related to "StoredDiagnostics", to better capture what we're actually storing. - Move SourceManager and FileManager to the heap. llvm-svn: 100441
* Code completion results that refer to macros now get the cursor kindDouglas Gregor2010-04-051-1/+1
| | | | | | | of macro definitions when passed to CIndex. Add test for code completion of macros via CIndex. llvm-svn: 100431
* Driver: Add support for a CLANGXX_IS_PRODUCTION build variable, which enableDaniel Dunbar2010-04-012-2/+15
| | | | | | Clang++ support, even in "Production" mode (for testing purposes). llvm-svn: 100119
* Reinstate my CodeModificationHint -> FixItHint renaming patch, withoutDouglas Gregor2010-03-311-1/+1
| | | | | | the C-only "optimization". llvm-svn: 100022
* Revert r100008, which inexplicably breaks the clang-i686-darwin10 builderDouglas Gregor2010-03-311-1/+1
| | | | llvm-svn: 100018
* Rename CodeModificationHint to FixItHint, since we've been using theDouglas Gregor2010-03-311-1/+1
| | | | | | | term "fix-it" everywhere and even *I* get tired of long names sometimes. No functionality change. llvm-svn: 100008
* Teach Clang's -cc1 option -print-stats to print LLVM statistics.Douglas Gregor2010-03-301-0/+3
| | | | llvm-svn: 99894
* make -ftime-report work even in -disable-free mode. Woo, finally.Chris Lattner2010-03-302-6/+18
| | | | | | rdar://7781603 llvm-svn: 99878
* scan-build: set environment variable LDPLUSPLUS to 'c++-analyzer' to ↵Ted Kremenek2010-03-271-5/+6
| | | | | | | | correctly link projects with c++ code. llvm-svn: 99684
* Return translation units from clang_createTranslationUnitFromSource()Ted Kremenek2010-03-261-2/+1
| | | | | | if even they contain errors. llvm-svn: 99594
* Add c-index-test support for printing USRs.Ted Kremenek2010-03-251-4/+187
| | | | llvm-svn: 99476
* Require that all Clang-based USRs start with the prefix 'c:' for the "USR ↵Ted Kremenek2010-03-251-6/+15
| | | | | | space". llvm-svn: 99475
* Make sure that we have File IDs for all of the unsaved files before weDouglas Gregor2010-03-241-0/+1
| | | | | | deserialize diagnostics. llvm-svn: 99426
* Frontend: Don't free the CompilerInstance or FrontendActions when running underDaniel Dunbar2010-03-231-18/+27
| | | | | | | | -disable-free. Among other things, this fixes freeing of the LLVM module on exit. - Note that this means we are disable-free'ing of a lot more stuff than we used to -- this should flush out bugs in anything left that is trying to do real work in its destructor. I did a mini-audit but '::~' is not totally uncommon. llvm-svn: 99258
* Use the cursor's ASTContext rather than the ASTContext computed from aDouglas Gregor2010-03-221-2/+2
| | | | | | | declaration, just in case invalid code makes the latter incorrect. This may be the cause behind <rdar://problem/7777070>. llvm-svn: 99179
* Use DEFINE_SYMBOL property to control dllexport/dllimportKovarththanan Rajaratnam2010-03-221-2/+2
| | | | llvm-svn: 99176
* Driver: Support CC_PRINT_OPTIONS, used for logging the compile commands (in ↵Daniel Dunbar2010-03-201-0/+5
| | | | | | -v style) to a file. llvm-svn: 99054
* Fix unused variable warning.Daniel Dunbar2010-03-201-2/+1
| | | | llvm-svn: 99021
* Optimize region-of-interest based cursor walks through theDouglas Gregor2010-03-201-6/+49
| | | | | | | | preprocessed entities by grouping preprocessed entities by file ID. This drastically improves performance of repeated clang_getCursor() calls local tests, although it is a bit ugly. llvm-svn: 99015
* Implement serialization and lazy deserialization of the preprocessingDouglas Gregor2010-03-191-24/+9
| | | | | | | | | | | | | | | | | | | | | | | | record (which includes all macro instantiations and definitions). As with all lay deserialization, this introduces a new external source (here, an external preprocessing record source) that loads all of the preprocessed entities prior to iterating over the entities. The preprocessing record is an optional part of the precompiled header that is disabled by default (enabled with -detailed-preprocessing-record). When the preprocessor given to the PCH writer has a preprocessing record, that record is written into the PCH file. When the PCH reader is given a PCH file that contains a preprocessing record, it will be lazily loaded (which, effectively, implicitly adds -detailed-preprocessing-record). This is the first case where we have sections of the precompiled header that are added/removed based on a compilation flag, which is unfortunate. However, this data consumes ~550k in the PCH file for Cocoa.h (out of ~9.9MB), and there is a non-trivial cost to gathering this detailed preprocessing information, so it's too expensive to turn on by default. In the future, we should investigate a better encoding of this information. llvm-svn: 99002
* Teach clang_getCursorKindSpelling() about CXCursor_InvalidCode.Ted Kremenek2010-03-191-0/+2
| | | | llvm-svn: 98982
* Make the CIndex API more resilient to being used on invalid code.Ted Kremenek2010-03-193-9/+29
| | | | llvm-svn: 98981
* clang -cc1: Kill off -empty-input only, and replace with -init-only which is anDaniel Dunbar2010-03-191-0/+1
| | | | | | | | actual action. - This is easier to use, and more reliable for timing the thing this was actually meant to be useful for. llvm-svn: 98978
* Optionally store a PreprocessingRecord in the preprocessor itself, andDouglas Gregor2010-03-191-6/+9
| | | | | | tie its creation to a CC1 flag -detailed-preprocessing-record. llvm-svn: 98963
* Visit preprocessing elements (macro instantiations and macroDouglas Gregor2010-03-191-106/+48
| | | | | | | | definitions) as part of the translation unit, so that normal visitation, token-annotation, and cursor-at retrieval all see preprocessing elements. llvm-svn: 98935
* Revert 98907 since it is breaking buildbots.Bob Wilson2010-03-191-45/+106
| | | | | | | | --- Reverse-merging r98907 into '.': D test/Index/c-index-getCursor-pp.c U tools/CIndex/CIndex.cpp llvm-svn: 98929
* Visit preprocessing elements (macro instantiations and macroDouglas Gregor2010-03-191-106/+45
| | | | | | | | definitions) as part of the translation unit, so that normal visitation, token-annotation, and cursor-at retrieval all see preprocessing elements. llvm-svn: 98907
* Try to appease MSVC's standard libraryDouglas Gregor2010-03-181-0/+14
| | | | llvm-svn: 98878
* Try to appease MSVCDouglas Gregor2010-03-181-4/+4
| | | | llvm-svn: 98875
* Explicitly link macro instantiations to macro definitions in theDouglas Gregor2010-03-181-0/+8
| | | | | | | | preprocessing record. Use that link with clang_getCursorReferenced() and clang_getCursorDefinition() to match instantiations of a macro to the definition of the macro. llvm-svn: 98842
* Expose macro definitions as CIndex cursors. These can still only beDouglas Gregor2010-03-183-1/+43
| | | | | | generated by clang_annotateTokens(). llvm-svn: 98837
* Introduce the notion of a "preprocessing record", which keeps track ofDouglas Gregor2010-03-183-96/+62
| | | | | | | | | | | | | | | | | | | | | | | | the macro definitions and macro instantiations that are found during preprocessing. Preprocessing records are *not* generated by default; rather, we provide a PPCallbacks subclass that hooks into the existing callback mechanism to record this activity. The only client of preprocessing records is CIndex, which keeps track of macro definitions and instantations so that they can be exposed via cursors. At present, only token annotation uses these facilities, and only for macro instantiations; both will change in the near future. However, with this change, token annotation properly annotates macro instantiations that do not produce any tokens and instantiations of macros that are later undef'd, improving our consistency. Preprocessing directives that are not macro definitions are still handled by clang_annotateTokens() via re-lexing, so that we don't have to track every preprocessing directive in the preprocessing record. Performance impact of preprocessing records is still TBD, although it is limited to CIndex and therefore out of the path of the main compiler. llvm-svn: 98836
* More token-annotation experimentation, preprocessing the annotatedDouglas Gregor2010-03-183-12/+115
| | | | | | | token sequence to detect macro instantiations (that produce at least token). WIP. llvm-svn: 98826
* Experimental stab at using relexing to identify preprocessorDouglas Gregor2010-03-184-8/+141
| | | | | | | | directives while annotating tokens in CIndex. This functionality should probably be factored out of this routine, but we're not there yet. llvm-svn: 98786
OpenPOWER on IntegriCloud