summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang
Commit message (Collapse)AuthorAgeFilesLines
...
* First test commit.Erik Verbruggen2011-09-191-1/+0
| | | | llvm-svn: 140016
* [libclang] Remove libclang.darwin.exports, it's not used anymore.Argyrios Kyrtzidis2011-09-131-150/+0
| | | | llvm-svn: 139661
* [libclang] Introduce clang_getPresumedLocation which works like ↵Argyrios Kyrtzidis2011-09-133-0/+30
| | | | | | | | | | clang_getExpansionLocation but takes into account #line directives coming from preprocessed files. Patch by Vinay Sajip! llvm-svn: 139647
* [libclang] Correct annotation and taking of cursor for objc class referencesArgyrios Kyrtzidis2011-09-131-1/+9
| | | | | | inside the IBOutletCollection attribute. llvm-svn: 139621
* Rename InterFace -> Interface, no functionality change.Argyrios Kyrtzidis2011-09-131-1/+1
| | | | llvm-svn: 139620
* [libclang]Argyrios Kyrtzidis2011-09-132-38/+13
| | | | | | | | -Allow cursor visitation of an attribute using its source range -Add C++ 'final' and 'override' attributes as cursor kinds -Simplify the logic that marks 'final' and 'override' attributes as tokens. llvm-svn: 139609
* [libclang] For getDeclFromExpr in CIndex.cpp, associate the decl ofArgyrios Kyrtzidis2011-09-121-1/+4
| | | | | | | a DeclRefExpr, MemberExpr, etc. with a CastExpr if it is ImplicitCast, since the implicit cast is the one that is invisible in source code. llvm-svn: 139547
* Kill of the Decl::PCHLevel field entirely. We now only need to knowDouglas Gregor2011-09-101-15/+5
| | | | | | whether a Decl was deserialized from an AST file (any AST file). llvm-svn: 139438
* The translation unit is never deserializedDouglas Gregor2011-09-091-1/+1
| | | | llvm-svn: 139436
* Update libclang to have APIs corresponding to the new 'expansion' namingChandler Carruth2011-08-311-16/+24
| | | | | | | | | | | system for macro-backed source locations. The old APIs are preserved for legacy users. This was intended to land with the main work of instantiation -> expansion, but despite running it by Doug over a month ago, I forgot to commit it. Very sorry for that... llvm-svn: 138860
* [libclang] Rename some functions and make sure we don't iterate past the ↵Argyrios Kyrtzidis2011-08-301-12/+14
| | | | | | tokens array. llvm-svn: 138813
* objective-c: Treat top-level objective-c declarationsFariborz Jahanian2011-08-271-8/+5
| | | | | | | | | | , such as list of forward @class decls, in a DeclGroup node. Deal with its consequence throught clang. This is in preparation for more Sema work ahead. // rdar://8843851. Feel free to reverse if it breaks something important and I am unavailable. llvm-svn: 138709
* Eliminate the -chained-pch flag and all of the frontend and libclang options ↵Douglas Gregor2011-08-251-9/+1
| | | | | | associated with it. Chained PCH is the only way to build a PCH file that includes another PCH file llvm-svn: 138597
* Introduce a -cc1 option "-emit-module", that creates a binary moduleDouglas Gregor2011-08-251-3/+4
| | | | | | | | | from the given source. -emit-module behaves similarly to -emit-pch, except that Sema is somewhat more strict about the contents of -emit-module. In the future, there are likely to be more interesting differences. llvm-svn: 138595
* [libclang] Fix getting a cursor that points inside tag definition that is partArgyrios Kyrtzidis2011-08-251-0/+3
| | | | | | | | | | | | | | | of a type specifier. e.g. for: typedef struct _MyS { int foo; } MyS; pointing at field 'foo' would give a cursor for the typedef declaration 'MyS' instead of the field. llvm-svn: 138593
* [libclang] Remove NestedNameSpecifierVisit, as Clang says that this code is ↵Ted Kremenek2011-08-181-36/+1
| | | | | | dead. llvm-svn: 137999
* [libclang] Annotate correctly macro argument tokens.Argyrios Kyrtzidis2011-08-181-45/+150
| | | | llvm-svn: 137961
* [libclang] Workaround potential race condition with code completion ↵Ted Kremenek2011-08-173-0/+20
| | | | | | | | | AllocatedResults being freed after a CXTranslationUnit. The Container USR's CXString had its underlying data owned by the CXTranslationUnit's string pool. This would result in trying to access freed memory. llvm-svn: 137887
* [libclang] Implicit objc methods are skipped, no need to check isSynthesized.Argyrios Kyrtzidis2011-08-171-6/+0
| | | | | | Plus, isSynthesized returning true does not mean that there is not a user-declared method declaration. llvm-svn: 137858
* Mark objc methods that are implicitly declared for properties (not ↵Argyrios Kyrtzidis2011-08-171-7/+0
| | | | | | | | user-declared) as implicit. This results in libclang ignoring such methods. llvm-svn: 137852
* [libclang] Make clang_getCursor able to handle locations that point inside ↵Argyrios Kyrtzidis2011-08-171-6/+16
| | | | | | | | | | | | | | | | | macro arguments. e.g. for: \define INVOKE(METHOD, CLASS) [CLASS METHOD] void test2() { INVOKE(meth, MyClass); } Pointing at 'meth' will give a CXCursor_ObjCMessageExpr and pointing at 'MyClass' will give a CXCursor_ObjCClassRef. llvm-svn: 137796
* [libclang] Require explicit cursor visitation for all TypeLocs (compilation willArgyrios Kyrtzidis2011-08-151-28/+39
| | | | | | fail if a TypeLoc kind is not handled) and handle DecltypeTypeLoc and InjectedClassNameTypeLoc. llvm-svn: 137670
* [libclang] Handle AttributedTypeLoc for cursor visitation. Fixes rdar://9535717.Argyrios Kyrtzidis2011-08-151-0/+5
| | | | llvm-svn: 137634
* Implement function template specialization at class scope extension in ↵Francois Pichet2011-08-141-0/+1
| | | | | | | | | | | | | | | | | Microsoft mode. A new AST node is introduced: ClassScopeFunctionSpecialization. This node holds a FunctionDecl that is not yet specialized; then during the class template instantiation the ClassScopeFunctionSpecialization will spawn the actual function specialization. Example: template <class T> class A { public: template <class U> void f(U p) { } template <> void f(int p) { } // <== class scope specialization }; This extension is necessary to parse MSVC standard C++ headers, MFC and ATL code. BTW, with this feature in, clang can parse (-fsyntax-only) all the MSVC 2010 standard header files without any error. llvm-svn: 137573
* In the serialized AST format, make the translation unit a "predefined"Douglas Gregor2011-08-121-1/+1
| | | | | | | | | | declaration that never actually gets serialized. Instead, serialize the various kinds of update records (lexical decls, visible decls, the addition of an anonymous namespace) for the translation unit, even if we're not chaining. This way, we won't have to deal with multiple loaded translation unit declarations. llvm-svn: 137395
* [libclang] When pointing at an objc property don't return a cursor that ↵Argyrios Kyrtzidis2011-08-101-0/+7
| | | | | | | | points at the synthesized method for the property. rdar://9771715 llvm-svn: 137248
* Switch a C-style cast over to a const_cast. No functionality changeDouglas Gregor2011-08-101-1/+1
| | | | llvm-svn: 137218
* Add a new libclang API to return a CXCompletionString for an arbitraryDouglas Gregor2011-08-043-0/+38
| | | | | | cursor, from Connor Wakamo! Addresses <rdar://problem/9087798>. llvm-svn: 136911
* When performing code completion after at @interface, allow bothDouglas Gregor2011-07-301-1/+1
| | | | | | | | already-defined and forward-declared results. Already-defined results are fine because they could be the start of a category. Fixes <rdar://problem/9811691>. llvm-svn: 136559
* clang_getCXTUResourceUsage: report memory used by HeaderSearch.Ted Kremenek2011-07-261-0/+6
| | | | | | | This required converting the StringMaps to use a BumpPtrAllocator. I measured the compile time and saw no observable regression. llvm-svn: 136190
* clang_getCXTUResourceUsage: Report memory used by data structures in ↵Ted Kremenek2011-07-261-1/+8
| | | | | | SourceManager. llvm-svn: 136189
* Eliminate a bunch of temporary strings.Benjamin Kramer2011-07-261-1/+1
| | | | llvm-svn: 136092
* Add new libclang API, clang_codeCompleteGetObjCSelector(), whichDouglas Gregor2011-07-263-2/+33
| | | | | | | provides the partial Objective-C selector used in a code completion. From Connor Wakamo! llvm-svn: 136084
* Fix the MSVC build. 2 problems:Francois Pichet2011-07-251-40/+41
| | | | | | | - buildPieces was return a C++ object from inside an extern "C". (MSVC didn't like that) - clang_getCursorReferenceNameRange was missing a CINDEX_LINKAGE causing a link error. llvm-svn: 135983
* Rename getInstantiationLineNumber to getExpansionLineNumber in bothChandler Carruth2011-07-251-1/+1
| | | | | | SourceManager and FullSourceLoc. llvm-svn: 135969
* Rename getInstantiationColumnNumber to getExpansionColumnNumber in bothChandler Carruth2011-07-251-1/+1
| | | | | | SourceManager and FullSourceLoc. llvm-svn: 135965
* Rename getDecomposedInstantiationLoc to getDecomposedExpansionLoc.Chandler Carruth2011-07-251-5/+4
| | | | llvm-svn: 135962
* Added clang_getCursorReferenceNameRange to libclang to to retrieve parts ofDouglas Gregor2011-07-253-0/+90
| | | | | | a cursor reference, from Erik Verbruggen! llvm-svn: 135920
* Rename SourceManager::getInstantiationRange to getExpansionRange.Chandler Carruth2011-07-251-1/+1
| | | | llvm-svn: 135915
* Mechanically rename SourceManager::getInstantiationLoc andChandler Carruth2011-07-252-3/+3
| | | | | | | | FullSourceLoc::getInstantiationLoc to ...::getExpansionLoc. This is part of the API and documentation update from 'instantiation' as the term for macros to 'expansion'. llvm-svn: 135914
* Extend libclang with clang_equalRanges, from Erik Verbruggen!Douglas Gregor2011-07-233-0/+10
| | | | llvm-svn: 135860
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-236-54/+54
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* New libclang API to expose container type for code completion, fromDouglas Gregor2011-07-213-6/+90
| | | | | | Connor Wakamo! llvm-svn: 135651
* Rework the detailed preprocessing record to separate preprocessingDouglas Gregor2011-07-211-49/+61
| | | | | | | | | | | | | | | entities generated directly by the preprocessor from those loaded from the external source (e.g., the ASTReader). By separating these two sets of entities into different vectors, we allow both to grow independently, and eliminate the need for preallocating all of the loaded preprocessing entities. This is similar to the way the recent SourceManager refactoring treats FileIDs and the source location address space. As part of this, switch over to building a continuous range map to track preprocessing entities. llvm-svn: 135646
* now that we have a centralized place to do so, add some using declarations forChris Lattner2011-07-201-1/+2
| | | | | | | some common llvm types: stringref and smallvector. This cleans up the codebase quite a bit. llvm-svn: 135576
* Revamp the SourceManager to separate the representation of parsedDouglas Gregor2011-07-191-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | source locations from source locations loaded from an AST/PCH file. Previously, loading an AST/PCH file involved carefully pre-allocating space at the beginning of the source manager for the source locations and FileIDs that correspond to the prefix, and then appending the source locations/FileIDs used for parsing the remaining translation unit. This design forced us into loading PCH files early, as a prefix, whic has become a rather significant limitation. This patch splits the SourceManager space into two parts: for source location "addresses", the lower values (growing upward) are used to describe parsed code, while upper values (growing downward) are used for source locations loaded from AST/PCH files. Similarly, positive FileIDs are used to describe parsed code while negative FileIDs are used to file/macro locations loaded from AST/PCH files. As a result, we can load PCH/AST files even during parsing, making various improvemnts in the future possible, e.g., teaching #include <foo.h> to look for and load <foo.h.gch> if it happens to be already available. This patch was originally written by Sebastian Redl, then brought forward to the modern age by Jonathan Turner, and finally polished/finished by me to be committed. llvm-svn: 135484
* [libclang] Map canonical decl of a category implementation to the category decl.Argyrios Kyrtzidis2011-07-151-0/+4
| | | | llvm-svn: 135316
* Revert r135304 and apply fix in clang_getCanonicalCursor per Doug's, ↵Argyrios Kyrtzidis2011-07-151-1/+6
| | | | | | Fariborz's comments. llvm-svn: 135314
* Create a new expression node, SubstNonTypeTemplateParmExpr,John McCall2011-07-151-0/+1
| | | | | | | | to represent a fully-substituted non-type template parameter. This should improve source fidelity, as well as being generically useful for diagnostics and such. llvm-svn: 135243
* Clean up two lingering comments that mention 'instantiation' w.r.t.Chandler Carruth2011-07-141-3/+3
| | | | | | macros in libclang. llvm-svn: 135148
OpenPOWER on IntegriCloud