summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang
Commit message (Collapse)AuthorAgeFilesLines
* [libclang] Further simplify the indexing API.Argyrios Kyrtzidis2011-11-126-291/+150
| | | | | | | That stuff can be added later on if we need them. Also add some const goodness. llvm-svn: 144446
* Tweak CXLoadedDiagnosticSetImpl::makeString() to include an extra null ↵Ted Kremenek2011-11-111-5/+8
| | | | | | character, and change the creation of the FixIT's string to again just rely on this string (instead of duplicating it when calling createCXString). llvm-svn: 144389
* libclang/CXLoadedDiagnostic.cpp: Work around not to miss the string ↵NAKAMURA Takumi2011-11-111-1/+1
| | | | | | | | terminator on fixit. FixIts might be exposed as C string via clang_getCString(), though the zero terminator is not allocated in CXLoadedDiagnosticSetImpl::makeString. llvm-svn: 144379
* [libclang] Simplify the indexing API.Argyrios Kyrtzidis2011-11-116-402/+412
| | | | | | | | Cut down the number of callbacks to more generic ones. Clients can check an enum to find out what kind of declaration it is and they can call functions to get more specific information than the generic provided info. llvm-svn: 144343
* serialized diagnostics: implement full deserialization of clang diagnostics ↵Ted Kremenek2011-11-1010-101/+977
| | | | | | | | via the libclang API. I've tested it on simple cases and it works. Test cases to follow as well as a few tweaks. llvm-svn: 144269
* Sort contents of exports file. No functionality change.Ted Kremenek2011-11-081-4/+4
| | | | llvm-svn: 144116
* Change the AST representation of operations on Objective-CJohn McCall2011-11-062-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | property references to use a new PseudoObjectExpr expression which pairs a syntactic form of the expression with a set of semantic expressions implementing it. This should significantly reduce the complexity required elsewhere in the compiler to deal with these kinds of expressions (e.g. IR generation's special l-value kind, the static analyzer's Message abstraction), at the lower cost of specifically dealing with the odd AST structure of these expressions. It should also greatly simplify efforts to implement similar language features in the future, most notably Managed C++'s properties and indexed properties. Most of the effort here is in dealing with the various clients of the AST. I've gone ahead and simplified the ObjC rewriter's use of properties; other clients, like IR-gen and the static analyzer, have all the old complexity *and* all the new complexity, at least temporarily. Many thanks to Ted for writing and advising on the necessary changes to the static analyzer. I've xfailed a small diagnostics regression in the static analyzer at Ted's request. llvm-svn: 143867
* [libclang] Move CursorVisitor to its own header.Argyrios Kyrtzidis2011-11-033-239/+264
| | | | llvm-svn: 143639
* [libclang] Use CursorVisitor::Visit instead of invoking the visitor directly.Argyrios Kyrtzidis2011-11-031-18/+2
| | | | llvm-svn: 143637
* [libclang] Add missing return in clang_getExpansionLocation that resulted in ↵Argyrios Kyrtzidis2011-11-031-0/+1
| | | | | | | | | | | that function always returning a null file/line/column. Also add at least one use of clang_getExpansionLocation inside c-index-test that would have made the tests to catch that. llvm-svn: 143606
* [libclang] Add infrastructure to be able to only deserialize decls in a file ↵Argyrios Kyrtzidis2011-11-031-5/+144
| | | | | | | | region and use it for clang_getCursor. llvm-svn: 143605
* Add missing export. Spotted by Leandro Melo.Eli Friedman2011-11-011-0/+1
| | | | llvm-svn: 143508
* [libclang] For a class extension, give it a unique USR but for any property ↵Argyrios Kyrtzidis2011-11-011-4/+16
| | | | | | | | | | or ivar it contains give it a USR based on its semantic context, which is the interface. This follows what we already did for objc methods. rdar://10371669 llvm-svn: 143464
* Rework the AST for the initializer of a delegating constructor, soDouglas Gregor2011-11-011-2/+2
| | | | | | | | | that it retains source location information for the type. Aside from general goodness (being able to walk the types described in that information), we now have a proper representation for dependent delegating constructors. Fixes PR10457 (for real). llvm-svn: 143410
* [libclang] Tweak internals of CXSourceLocation to allow an alternate ↵Ted Kremenek2011-10-311-75/+111
| | | | | | | | implementation if the lowest bit of ptr_data[0] is not 0. This is prep for work on serialized diagnostics. llvm-svn: 143373
* [libclang] Move implementation of functions for manipulation ↵Ted Kremenek2011-10-313-226/+271
| | | | | | CXSourceLocations and CXSourceRanges into a separate file. llvm-svn: 143370
* [libclang] Add CXDiagnosticImpl to represent a super class for the ↵Ted Kremenek2011-10-314-93/+238
| | | | | | | | implementation backing a CXDiagnostic. This allows CXStoredDiagnostic to be just one possible implementation of a CXDiagnostic. llvm-svn: 143368
* [libclang] Rename VisitIncludedPreprocessingEntries -> VisitIncludedEntitiesArgyrios Kyrtzidis2011-10-311-10/+10
| | | | llvm-svn: 143337
* Use LIBCLANG_NOTHREADS instead of CINDEXTEST_NOTHREADS inside libclang,Argyrios Kyrtzidis2011-10-292-2/+2
| | | | | | so the c-index-test one can be enabled without affecting libclang. llvm-svn: 143288
* [libclang] Check for environment variable CINDEXTEST_NOTHREADS in ↵Argyrios Kyrtzidis2011-10-281-0/+6
| | | | | | clang_reparseTranslationUnit. llvm-svn: 143242
* Use const_cast to make it obvious that it's just removing constness (and ↵Benjamin Kramer2011-10-282-4/+6
| | | | | | silence warnings). llvm-svn: 143193
* Implement support for dependent Microsoft __if_exists/__if_not_existsDouglas Gregor2011-10-252-1/+17
| | | | | | | | | | statements. As noted in the documentation for the AST node, the semantics of __if_exists/__if_not_exists are somewhat different from the way Visual C++ implements them, because our parsed-template representation can't accommodate VC++ semantics without serious contortions. Hopefully this implementation is "good enough". llvm-svn: 142901
* [PCH] When visiting preprocessed entities, make it possible to avoid ↵Argyrios Kyrtzidis2011-10-251-14/+82
| | | | | | | | | | | | | | | deserializing preprocessed entities that are #included in the range that we are interested. This is useful when we are interested in preprocessed entities of a specific file, e.g when we are annotating tokens. There is also an optimization where we cache the last result of PreprocessingRecord::getPreprocessedEntitiesInRange and we re-use it if there is a call with the same range as before. rdar://10313365 llvm-svn: 142887
* More metaprogramming with builtin types.John McCall2011-10-182-31/+10
| | | | llvm-svn: 142433
* [libclang] Make sure we do a correct invalid check in ↵Argyrios Kyrtzidis2011-10-181-1/+1
| | | | | | clang_getExpansionLocation. llvm-svn: 142430
* Macro metaprogramming for builtin types.John McCall2011-10-181-1/+1
| | | | llvm-svn: 142420
* [libclang] Since an objc extension semantically continues the interface of ↵Argyrios Kyrtzidis2011-10-181-4/+2
| | | | | | | | | the class don't use unique USRs for them, otherwise we fail to associate @implementation methods with the methods in extensions. llvm-svn: 142361
* [libclang] Index implicit property references.Argyrios Kyrtzidis2011-10-183-3/+21
| | | | llvm-svn: 142355
* [libclang] Index method references.Argyrios Kyrtzidis2011-10-181-0/+6
| | | | llvm-svn: 142353
* Silence a -Wc++0x-narrowing warningMatt Beaumont-Gay2011-10-171-1/+1
| | | | llvm-svn: 142292
* [libclang] Introduce a new high level API for indexing clients that assumesArgyrios Kyrtzidis2011-10-1713-13/+1807
| | | | | | | | | more of the work involved in indexing a translation unit and simplifies client implementations. Only C/ObjC for now, C++ (and comments) to come. llvm-svn: 142233
* Add a new placeholder type to represent "unbridged"John McCall2011-10-172-0/+2
| | | | | | | | casts in ARC. No semantic analysis yet. llvm-svn: 142208
* Provide half floating point support as a storage only type.Anton Korobeynikov2011-10-142-0/+3
| | | | | | Lack of half FP was a regression compared to llvm-gcc. llvm-svn: 142016
* Change operator<< for raw_ostream and NamedDecl to take a reference instead ↵Benjamin Kramer2011-10-141-1/+1
| | | | | | | | of a pointer. Passing a pointer was a bad idea as it collides with the overload for void*. llvm-svn: 141971
* Added clang_getCompletionAnnotation and clang_getCompletionNumAnnotations toErik Verbruggen2011-10-142-0/+16
| | | | | | retrieve annotations from completion string. llvm-svn: 141953
* Allow for annotate attributes after access specifiers. When suchErik Verbruggen2011-10-132-0/+8
| | | | | | attributes are found, propagate them to subsequent declarations. llvm-svn: 141861
* [libclang] Allow using getDeclCursorUSR function with a Decl* and not a cursor.Argyrios Kyrtzidis2011-10-122-30/+41
| | | | llvm-svn: 141770
* [libclang] Make MakeCXTranslationUnit usable outside CIndex.cpp.Argyrios Kyrtzidis2011-10-122-1/+11
| | | | llvm-svn: 141769
* Initial implementation of __atomic_* (everything except __atomic_is_lock_free).Eli Friedman2011-10-111-0/+1
| | | | llvm-svn: 141632
* Make sure we initialize the "extra" data within the libclang codeDouglas Gregor2011-10-101-1/+6
| | | | | | | | | completion context, in case we end up having no code-completion callback. Individual instances of this problem are always bugs that need to be fixed, but it's better to make sure we have initialized data here. llvm-svn: 141598
* [libclang] Do ConcurrencyCheck for clang_getLocation as well.Argyrios Kyrtzidis2011-10-101-0/+1
| | | | llvm-svn: 141583
* Rename TagDecl::isDefinition -> isCompleteDefinitionJohn McCall2011-10-071-1/+1
| | | | | | | for better self-documenting code, since the semantics are subtly different from getDefinition(). llvm-svn: 141355
* Support for C1x _Atomic specifier (see testcase). This is primarily being ↵Eli Friedman2011-10-061-0/+4
| | | | | | | | committed at the moment to help support C++0x <atomic>, but it should be a solid base for implementing the full specification of C1x _Atomic. Thanks to Jeffrey Yasskin for the thorough review! llvm-svn: 141330
* [libclang] Introduce clang_findReferencesInFile which accepts a cursor, a file,Argyrios Kyrtzidis2011-10-067-53/+561
| | | | | | | | and a callback and finds all identifier references of the cursor in the file. rdar://7948304 llvm-svn: 141277
* [libclang] Move the bulk of clang_getOverriddenCursors intoArgyrios Kyrtzidis2011-10-063-95/+95
| | | | | | | a cxcursor::getOverriddenCursors C++ function, because SmallVectors are groovier that malloc'ing buffers. llvm-svn: 141276
* Expose more statement, expression, and declaration kinds in libclang,Douglas Gregor2011-10-052-97/+427
| | | | | | from Manuel Holtgrewe! llvm-svn: 141200
* Improve location fidelity of objc decls.Argyrios Kyrtzidis2011-10-041-2/+0
| | | | | | | | -Add the location of the class name to all objc container decls, not just ObjCInterfaceDecl. -Make objc decls consistent with the rest of the NamedDecls and have getLocation() point to the class name, not the location of '@'. llvm-svn: 141061
* [libclang] Introduce CXCursor_CXXAccessSpecifier for C++'s ↵Argyrios Kyrtzidis2011-09-302-3/+10
| | | | | | | | public:/private:/protected: specifiers. Patch by Paolo Capriotti! llvm-svn: 140864
* [libclang] Introduce clang_Range_isNull.Argyrios Kyrtzidis2011-09-282-0/+6
| | | | llvm-svn: 140706
* When 'bool' is not a built-in type but is defined as a macro, printDouglas Gregor2011-09-271-1/+1
| | | | | | | 'bool' rather than '_Bool' within types, to make things a bit more readable. Fixes <rdar://problem/10063263>. llvm-svn: 140650
OpenPOWER on IntegriCloud