summaryrefslogtreecommitdiffstats
path: root/clang/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* libclang: Print more information when recovering from crashes inDaniel Dunbar2010-08-231-1/+20
| | | | | | clang_parseTranslationUnit. llvm-svn: 111855
* Detabify.Eli Friedman2010-08-221-1/+1
| | | | llvm-svn: 111768
* Another step in the process of making the parser depend on Sema:John McCall2010-08-206-9/+9
| | | | | | | | | - move DeclSpec &c into the Sema library - move ParseAST into the Parse library Reflect this change in a thousand different includes. Reflect this change in the link orders. llvm-svn: 111667
* When performing code-completion in the presence of a preamble, makeDouglas Gregor2010-08-201-6/+2
| | | | | | | | | sure to (1) actually use the remapped files we were given rather than old data, and (2) keep the remapped files alive until the code-completion results are destroyed. Big thanks to Daniel for the test case. llvm-svn: 111597
* libclang: Execute clang_codeCompleteAt() inside a crash recovery context.Daniel Dunbar2010-08-192-13/+48
| | | | | | | - Test case is disabled for now, because something isn't write with file remapping. llvm-svn: 111581
* c-index-test: Diagnose parse / completion failures in -code-completion-at=.Daniel Dunbar2010-08-191-0/+8
| | | | llvm-svn: 111580
* c-index-test: As with reparse, only honor remapped false during the codeDaniel Dunbar2010-08-191-3/+1
| | | | | | | completion step with -code-completion-at=, to allow testing simulated source changes. llvm-svn: 111579
* libclang/Darwin: Always set the compatibility version in the dylib.Daniel Dunbar2010-08-191-11/+10
| | | | llvm-svn: 111578
* Fix a c-index-test leak with file remappingDouglas Gregor2010-08-191-2/+3
| | | | llvm-svn: 111559
* More PCH -> AST renaming.Sebastian Redl2010-08-181-3/+3
| | | | llvm-svn: 111472
* Generate Attr subclasses with TableGen.Alexis Hunt2010-08-181-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | Now all classes derived from Attr are generated from TableGen. Additionally, Attr* is no longer its own linked list; SmallVectors or Attr* are used. The accompanying LLVM commit contains the updates to TableGen necessary for this. Some other notes about newly-generated attribute classes: - The constructor arguments are a SourceLocation and a Context&, followed by the attributes arguments in the order that they were defined in Attr.td - Every argument in Attr.td has an appropriate accessor named getFoo, and there are sometimes a few extra ones (such as to get the length of a variadic argument). Additionally, specific_attr_iterator has been introduced, which will iterate over an AttrVec, but only over attributes of a certain type. It can be accessed through either Decl::specific_attr_begin/end or the global functions of the same name. llvm-svn: 111455
* libclang: Put clang_reparseTranslationUnit inside a crash recovery context.Daniel Dunbar2010-08-181-8/+45
| | | | llvm-svn: 111451
* c-index-test: Change -test-load-source-repase to only use remapped files for theDaniel Dunbar2010-08-181-3/+4
| | | | | | reparse, to allow testing distinct inputs. llvm-svn: 111448
* Simplify the ownership model for DiagnosticClients, which was reallyDouglas Gregor2010-08-183-12/+13
| | | | | | | convoluted and a bit leaky. Now, the Diagnostic object owns its DiagnosticClient. llvm-svn: 111437
* Call llvm::remove_fatal_error_handler before deallocating objectsDan Gohman2010-08-182-2/+7
| | | | | | which are used by the error handling functions. llvm-svn: 111427
* libclang: Put clang_parseTranslationUnit inside a crash recovery context.Daniel Dunbar2010-08-181-12/+47
| | | | llvm-svn: 111387
* libclang: Implicitly enable crash recovery when using the libclang APIs. We ↵Daniel Dunbar2010-08-181-0/+5
| | | | | | may need to add an explicit API call, but hopefully we can make the crash recovery seamless enough that it doesn't make sense to turn it off. llvm-svn: 111386
* Simplify FixItHint by eliminated the unnecessary InsertionLocDouglas Gregor2010-08-181-20/+7
| | | | | | location. Patch by Eelis van der Weegen! llvm-svn: 111362
* Reintroduce the serialization library, with fixed dependencies.Sebastian Redl2010-08-176-6/+10
| | | | llvm-svn: 111279
* Remove the last bit of the Clang Serialization library, for nowDouglas Gregor2010-08-171-2/+1
| | | | llvm-svn: 111267
* Revert Sebastian's build-breaking patch.Douglas Gregor2010-08-172-4/+3
| | | | llvm-svn: 111265
* Add the clangSerialization library to libclang.Dan Gohman2010-08-171-1/+2
| | | | llvm-svn: 111261
* Create a new Serialization module that contains all the PCH code, and will ↵Sebastian Redl2010-08-172-3/+4
| | | | | | contain all the module code in the future. Update the Makefiles, CMake projects and the Xcode project. I hope I did everything right for Xcode. No functionality change. llvm-svn: 111258
* Extend the code-completion caching infrastructure to include globalDouglas Gregor2010-08-151-1/+2
| | | | | | | | | | | | | | | | | | declarations (in addition to macros). Each kind of declaration maps to a certain set of completion contexts, and the ASTUnit completion logic introduces the completion strings for those declarations if the actual code-completion occurs in one of the contexts where it matters. There are a few new code-completion-context kinds. Without these, certain completions (e.g., after "using namespace") would need to suppress all global completions, which would be unfortunate. Note that we don't get the priorities right for global completions, because we don't have enough type information. We'll need a way to compare types in an ASTContext-agnostic way before this can be implemented. llvm-svn: 111093
* Always recurse into sub-cursors when annotating tokens, as this information ↵Ted Kremenek2010-08-141-1/+0
| | | | | | is used for annotating macro arguments. This finishes up <rdar://problem/8044584>. llvm-svn: 111066
* As a heuristic, annotate tokens (via clang_annotateTokens) that are the ↵Ted Kremenek2010-08-141-0/+17
| | | | | | arguments of a macro instantiation using the closest cursor with the same spelling location. Because macro arguments can get token pasted in any arbitrary order, we use the annotation map to paper over the token -> cursor annotations during our post-processing stage. This fixes most of <rdar://problem/8044584>, but still doesn't work for assert(). llvm-svn: 111062
* Implement caching of code-completion results for macro definitionsDouglas Gregor2010-08-133-12/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | when the CXTranslationUnit_CacheCompletionResults option is given to clang_parseTranslationUnit(). Essentially, we compute code-completion results for macro definitions after we have parsed the file, then store an ASTContext-agnostic version of those results (completion string, cursor kind, priority, and active contexts) in the ASTUnit. When performing code completion in that ASTUnit, we splice the macro definition results into the results provided by the actual code-completion (which has had macros turned off) before libclang gets those results. We use completion context information to only splice in those results that make sense for that context. With a completion involving all of the macros from Cocoa.h and a few other system libraries (totally ~8500 macro definitions) living in a precompiled header, we get about a 9% performance improvement from code completion, since we no longer have to deserialize all of the macro definitions from the precompiled header. Note that macro definitions are merely the canary; the cache is designed to also support other top-level declarations, which should be a bigger performance win. That optimization will be next. Note also that there is no mechanism for determining when to throw away the cache and recompute its contents. llvm-svn: 111051
* Add an options parameter to clang_saveTranslationUnit, because we'll want it ↵Douglas Gregor2010-08-134-2/+9
| | | | | | later llvm-svn: 111016
* Implement clang_saveTranslationUnit(), which saves a translation unitDouglas Gregor2010-08-134-2/+51
| | | | | | into a PCH/AST file. llvm-svn: 111006
* Frontend: Move the bulk of the cc1_main() processing intoDaniel Dunbar2010-08-121-129/+3
| | | | | | ExecuteCompilerInvocation in libFrontend. llvm-svn: 110903
* clang -cc1: Move real diagnostics client initialization to earlier.Daniel Dunbar2010-08-121-13/+14
| | | | llvm-svn: 110902
* Once code completion has completed, pass a "completion context" on toDouglas Gregor2010-08-111-1/+3
| | | | | | | the code-completion consumer. The consumer can use this information to augument, filter, or display the code-completion results. llvm-svn: 110858
* Add a (currently unused) "options" parameter toDouglas Gregor2010-08-114-2/+10
| | | | | | | | | | clang_reparseTranslationUnit(), along with a function to retrieve the default recommended reparsing options for a translation unit. Also, add the CXTranslationUnit_CacheCompletionResults flag, which is also currently unused. llvm-svn: 110811
* Teach the libclang cursor visitor to walk into the type informationDouglas Gregor2010-08-101-0/+19
| | | | | | | | provided by __builtin_types_compatible_p and __builtin_va_arg expressions, now that Abramo has added proper type-source information to those expressions. llvm-svn: 110681
* Instead of having a specific CXTranslationUnit_* option flag forDouglas Gregor2010-08-094-4/+7
| | | | | | | | "editing" mode, introduce a separate function clang_defaultEditingTranslationUnitOptions() that retrieves the set of options. No functionality change. llvm-svn: 110613
* Fix mixed declarations and code warning.Daniel Dunbar2010-08-091-1/+1
| | | | llvm-svn: 110602
* Minor libclang tweaksDouglas Gregor2010-08-092-2/+5
| | | | llvm-svn: 110599
* Use precompiled preambles for in-process code completion.Douglas Gregor2010-08-093-18/+37
| | | | llvm-svn: 110596
* Don't pass -avoid-version to Darwin linkerDouglas Gregor2010-08-061-1/+1
| | | | llvm-svn: 110438
* Give clang_codeCompleteAt() an "options" parameter, and add a newDouglas Gregor2010-08-054-3/+14
| | | | | | | | | flags enumeration + default-generating function that allows code-completion to be customized via the libclang API. Plus, turn on spell-checking when performing code completion. llvm-svn: 110319
* When performing in-process code completion, don't free the remappedDouglas Gregor2010-08-041-10/+12
| | | | | | | file buffers until the code completion results are destroyed; diagnostics may end up referring into the source. llvm-svn: 110216
* Add code-completion support directly to ASTUnit, which performs codeDouglas Gregor2010-08-045-8/+181
| | | | | | | | | | | | | | completion within the translation unit using the same command-line arguments for parsing the translation unit. Eventually, we'll reuse the precompiled preamble to improve code-completion performance, and this also gives us a place to cache results. Expose this function via the new libclang function clang_codeCompleteAt(), which performs the code completion within a CXTranslationUnit. The completion occurs in-process (clang_codeCompletion() runs code completion out-of-process). llvm-svn: 110210
* When using a precompiled preamble, keep track of the top-levelDouglas Gregor2010-08-031-16/+6
| | | | | | | | | | declarations that we saw when creating the precompiled preamble, and provide those declarations in addition to the declarations parsed in the main source file when traversing top-level declarations. This makes the use of precompiled preambles a pure optimization, rather than changing the semantics of the parsed translation unit. llvm-svn: 110131
* Add Darwin dylib versioning support to libclang when build with CMake.Douglas Gregor2010-08-021-8/+13
| | | | llvm-svn: 110062
* Frontend: Change PluginASTAction::ParseArgs to take a CompilerInstance objectDaniel Dunbar2010-08-021-5/+5
| | | | | | | | | | | | for use in reporting diagnostics. - We don't want to use the Action's own CompilerInstance, because that is only initialized during file processing and I like that invariant. Also, if ParseArgs returns false then abandon execution. Also, remove unused PluginASTAction::PrintHelp virtual method. llvm-svn: 110039
* Driver: Keep track of a separate "install dir", which is the path where clangDaniel Dunbar2010-08-011-0/+18
| | | | | | | | | was invoked from (which may not be where the executable itself is). - This allows having e.g., /Developer/usr/bin/clang be a symlink to some other location, while still making sure the Driver finds 'as', 'ld', etc. relative to itself. llvm-svn: 109989
* Simplify.Daniel Dunbar2010-08-011-4/+2
| | | | llvm-svn: 109988
* build: Don't pass -avoid-version or -no-undefined on Darwin, they don't doDaniel Dunbar2010-07-311-2/+1
| | | | | | anything. llvm-svn: 109958
* Add clang_isPODType() for querying if the CXType is POD. Implements ↵Ted Kremenek2010-07-304-0/+11
| | | | | | <rdar://problem/8250669>. llvm-svn: 109822
* Prepare for upcoming ownership change.Benjamin Kramer2010-07-291-8/+7
| | | | llvm-svn: 109766
OpenPOWER on IntegriCloud