summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang
Commit message (Collapse)AuthorAgeFilesLines
...
* This patch remove the Win32 XFAIL from remap-complete.cFrancois Pichet2010-10-121-1/+2
| | | | | | The problem was that text files were open in text mode and Microsoft implementation of fread and write will try to do nasty line-feed conversion which make the line position no longer valid. The fix is to read and write files in binary mode. llvm-svn: 116286
* When we load an ASTUnit from command-line arguments, hold on to theDouglas Gregor2010-10-121-6/+2
| | | | | | | | | diagnostics produced by the driver itself. Previously, we were allowing these to either be dropped or to slip through to stderr. Fixes <rdar://problem/7595339>. llvm-svn: 116285
* Eliminate CIndexer::getClangPath(), since libclang no longer dependsDouglas Gregor2010-10-112-41/+18
| | | | | | | | | | | on the presence of a 'clang' executable. Simplify CIndexer::getClangResourcesPath() a bit. Patch up the CMake makefiles to install headers into two locations in the build tree, for those silly cases where 'clang' will end up looking into the wrong build directory for headers. llvm-svn: 116260
* Eliminate -fdiagnostics-binary and all of the infrastructure forDouglas Gregor2010-10-112-73/+0
| | | | | | | | emitting diagnostics in a binary form to be consumed by libclang, since libclang no longer does any of its work out-of-process, making this code dead. Besides, this stuff never worked at 100% anyway. llvm-svn: 116250
* Eliminate clang_codeComplete(). libclang clients should be using theDouglas Gregor2010-10-113-295/+0
| | | | | | faster, in-process, more-configurable clang_codeCompleteAt(). llvm-svn: 116245
* Switch c-index-test from clang_codeComplete() over toDouglas Gregor2010-10-111-7/+36
| | | | | | | | | | clang_codeCompleteAt(). This uncovered a few issues with the latter: - ASTUnit wasn't saving/restoring diagnostic state appropriately between reparses and code completions. - "Overload" completions weren't being passed through to the client llvm-svn: 116241
* Eliminate clang_setUseExternalASTGeneration() from libclang. BetweenDouglas Gregor2010-10-114-224/+53
| | | | | | | | | improvements to the compiler and the introduction of crash recovery, it no longer makes sense to allow this mode. Moreover, this eliminates one use of the "clang" executable from within libclang; we'd like them all to go away. llvm-svn: 116207
* Fix the mapping of vertical-space cursor kinds to produce a newline,Douglas Gregor2010-10-081-4/+1
| | | | | | rather than a space. llvm-svn: 116097
* libclang: Disable LLVM pretty stack trace functionality, which inadvertentlyDaniel Dunbar2010-10-081-0/+5
| | | | | | sets up signal handlers it shouldn't when we are being used a shared library. llvm-svn: 116084
* Fix a marvelous chained AST writing bug, where we end up with theDouglas Gregor2010-10-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | following amusing sequence: - AST writing schedules writing a type X* that it had never seen before - AST writing starts writing another declaration, ends up deserializing X* from a prior AST file. Now we have two type IDs for the same type! - AST writer tries to write X*. It only has the lower-numbered ID from the the prior AST file, so references to the higher-numbered ID that was scheduled for writing go off into lalaland. To fix this, keep the higher-numbered ID so we end up writing the type twice. Since this issue occurs so rarely, and type records are generally rather small, I deemed this better than the alternative: to keep a separate mapping from the higher-numbered IDs to the lower-numbered IDs, which we would end up having to check whenever we want to deserialize any type. Fixes <rdar://problem/8511624>, I think. llvm-svn: 115647
* Introduce a new libclang function, clang_getCursorDisplayName(), whichDouglas Gregor2010-10-023-0/+87
| | | | | | | | produces a simple "display" name that captures the arguments/parameters for a function, function template, class template, or class template specialization. llvm-svn: 115428
* Teach clang_getCursorType() about base specifiers and other referencesDouglas Gregor2010-10-021-15/+71
| | | | | | | | | | | to types. Also, teach clang_getTypeDeclaration() about template specializations, injected-class-names, and elaborated types. Fixes <rdar://problem/8506460>. llvm-svn: 115425
* Don't add -fno-spell-checking in libclang if a spell-checking-related ↵Douglas Gregor2010-10-021-3/+11
| | | | | | argument is already in the command-line arguments llvm-svn: 115420
* Provide proper source location and range information for C++ baseDouglas Gregor2010-10-021-4/+11
| | | | | | | specifier cursors in libclang. FIXME -=2, fixes the rest of <rdar://problem/8274883>. llvm-svn: 115419
* Teach clang_getCursorReferenced() about Objective-C property referenceDouglas Gregor2010-10-011-3/+9
| | | | | | and protocol expressions. Fixes <rdar://problem/7833565>. llvm-svn: 115346
* Extend libclang with an API that determines, given a C++ virtualDouglas Gregor2010-10-013-0/+115
| | | | | | | member function or an Objective-C method, which other member functions/methods it overrides. llvm-svn: 115338
* Enable caching of global code completion results in the suggestedDouglas Gregor2010-09-271-1/+2
| | | | | | libclang options for editing a translation unit. llvm-svn: 114810
* Teach libclang to enable multithreading in LLVM, since libclang clients are ↵Douglas Gregor2010-09-241-2/+14
| | | | | | likely to be multithreaded. Also move the printing of timers to somewhere better for multithreaded libclang clients llvm-svn: 114760
* Add some missing concurrency checks into libclangDouglas Gregor2010-09-232-3/+9
| | | | llvm-svn: 114682
* Implement libclang API functions for retrieving the lexical andDouglas Gregor2010-09-223-0/+34
| | | | | | semantic parents of the given cursor. llvm-svn: 114587
* Correctly register the class extension as the lexical DeclContext for ObjC ↵Ted Kremenek2010-09-211-2/+2
| | | | | | | | | | | | methods declared with @property in class extensions. This matches the behavior for setters. Also pass the class extension to ProcessPropertyDecl as the lexical DeclContext, even when not redeclaring the @property. This fixes the remaining issues in <rdar://problem/7410145>. llvm-svn: 114477
* Fix indentation.Ted Kremenek2010-09-211-1/+1
| | | | llvm-svn: 114394
* Check for null ObjCInterfaceDecls returned from getClassInterface() when ↵Ted Kremenek2010-09-211-4/+11
| | | | | | generating USRs. While I have no test case for this (could not create one), this shows up in crash reports. Tentatively fixes <rdar://problem/8452791>. llvm-svn: 114392
* Introduce a simple, substitution-based compression scheme for USRs, soDouglas Gregor2010-09-201-26/+43
| | | | | | | that redundant types don't result in super-long USRs. Fixes <rdar://problem/8447875>. llvm-svn: 114347
* When traversing an InitListExpr, there may not be a syntactic form;Douglas Gregor2010-09-171-1/+4
| | | | | | | check for NULL and visit the InitListExpr we have if there is no syntactic form. llvm-svn: 114203
* Fix a silly typo and its pasteo. Thanks to Francois Pichet for noticing my ↵Douglas Gregor2010-09-161-2/+2
| | | | | | mistake llvm-svn: 114075
* Revert "CMake: Update to use standard CMake dependency tracking facilities ↵Michael J. Spencer2010-09-131-19/+20
| | | | | | | | | | | | | instead" This reverts commit r113631 Conflicts: CMakeLists.txt lib/CodeGen/CMakeLists.txt llvm-svn: 113817
* Introduce a new kind of cursor into libclang, which covers a referenceDouglas Gregor2010-09-135-53/+202
| | | | | | | | | to an "overloaded" set of declarations. This cursor kind works for unresolved references to functions/templates (e.g., a call within a template), using declarations, and Objective-C class and protocol forward declarations. llvm-svn: 113805
* Fix my silly sorting predicate. I hate integer-to-bool conversionsDouglas Gregor2010-09-101-1/+1
| | | | llvm-svn: 113656
* CMake: Update to use standard CMake dependency tracking facilities insteadMichael J. Spencer2010-09-101-20/+19
| | | | | | of whatever we were using before... llvm-svn: 113631
* Define and implement CXXNoexceptExpr. Create it in Sema.Sebastian Redl2010-09-101-0/+1
| | | | llvm-svn: 113623
* Add libclang support for label statements, gotos, and taking theDouglas Gregor2010-09-103-3/+87
| | | | | | address of a label (GNU extension). llvm-svn: 113564
* Add libclang visitation for C99 designated initializers.Douglas Gregor2010-09-091-2/+38
| | | | llvm-svn: 113560
* Add libclang visitation for __builtin_offsetof's components (fieldsDouglas Gregor2010-09-091-2/+25
| | | | | | and array references). llvm-svn: 113556
* Teach libclang to walk the base and member initializers of aDouglas Gregor2010-09-093-4/+102
| | | | | | | | constructor, in source order. Also introduces a new reference kind for class members, which is used here (for member initializers) and will also be used for designated initializers and offsetof. llvm-svn: 113545
* Simplify template instantiation for C++ exception declarations,Douglas Gregor2010-09-091-3/+1
| | | | | | eliminating an unnecessary use of TemporaryBase in the process. llvm-svn: 113500
* Add proper type-source information to UnaryTypeTraitExpr, includingDouglas Gregor2010-09-091-2/+17
| | | | | | libclang visitation. llvm-svn: 113492
* Clean up CMake dependenciesDouglas Gregor2010-09-091-2/+1
| | | | llvm-svn: 113489
* Fix warnings caused by new CXXUuidofExprClass enumerator.Francois Pichet2010-09-081-0/+1
| | | | llvm-svn: 113444
* Provide proper type-source location information forDouglas Gregor2010-09-081-3/+26
| | | | | | | | CXXTemporaryObjectExpr, CXXScalarValueInitExpr, and CXXUnresolvedConstructExpr, getting rid of a bunch of FIXMEs in the process. llvm-svn: 113319
* Improve source-location information for CXXNewExpr, by hanging on toDouglas Gregor2010-09-071-1/+24
| | | | | | the TypeSourceInfo for the allocated type. Fixes PR7501. llvm-svn: 113291
* Synchronize code-completion cursor kinds with indexing cursorDouglas Gregor2010-09-031-65/+1
| | | | | | kinds. How shameful that this code was duplicated! llvm-svn: 113033
* Implement libclang visitation for UnresolvedMemberExpr. This is theDouglas Gregor2010-09-031-0/+10
| | | | | | | | | last of the C++-specific expressions where we have decent source information in the AST already. In particular, various object-construction expressions (CXXNewExpr, CXXTemporaryObjectExpr) still have poor source-location information that needs to be addressed. llvm-svn: 112981
* libclang visitation for CXXDependentScopeMemberExprDouglas Gregor2010-09-031-0/+32
| | | | llvm-svn: 112978
* libclang visitation for DependentScopeDeclRefExprDouglas Gregor2010-09-031-0/+26
| | | | llvm-svn: 112975
* Teach libclang to visit OverloadExprs, so that we can reuse thisDouglas Gregor2010-09-021-2/+13
| | | | | | code. Also, teach it about explicitly-specified template arguments. llvm-svn: 112884
* Add libclang visitation for UnresolvedLookupExprsDouglas Gregor2010-09-021-2/+19
| | | | llvm-svn: 112879
* Add libclang visitation for C++ pseudo-destructor expressions.Douglas Gregor2010-09-021-0/+28
| | | | llvm-svn: 112873
* Eliminate CXXBindReferenceExpr, which was used in a ton ofDouglas Gregor2010-09-021-1/+0
| | | | | | well-intentioned but completely unused code. llvm-svn: 112868
* Teach libclang not to recursive into default argument expressionsDouglas Gregor2010-09-021-0/+1
| | | | llvm-svn: 112866
OpenPOWER on IntegriCloud