Revision tags: llvmorg-3.1.0 |
|
#
08f96a9b |
| 09-May-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[AST/libclang] Speed up clang_getOverriddenCursors() considerably by reserving a bit in ObjCMethodDecl to indicate whether the method does not override any other method, which is the majority of case
[AST/libclang] Speed up clang_getOverriddenCursors() considerably by reserving a bit in ObjCMethodDecl to indicate whether the method does not override any other method, which is the majority of cases.
That way we can avoid unnecessary work doing lookups, especially when PCH is involved.
rdar://11360082
llvm-svn: 156476
show more ...
|
Revision tags: llvmorg-3.1.0-rc3, llvmorg-3.1.0-rc2 |
|
#
b47610a0 |
| 30-Apr-2012 |
Ted Kremenek <kremenek@apple.com> |
Fix C versus C++ linkage issue.
llvm-svn: 155842
|
#
d77f6219 |
| 30-Apr-2012 |
Ted Kremenek <kremenek@apple.com> |
Reduce malloc() traffic of clang_getOverridenCursors() by using a pool of SmallVector<CXCursor> objects under the covers.
Fixes <rdar://problem/11289160>.
llvm-svn: 155841
|
#
0caa3947 |
| 19-Apr-2012 |
Patrick Beard <pcbeard@mac.com> |
Implements boxed expressions for Objective-C. <rdar://problem/10194391>
llvm-svn: 155082
|
Revision tags: llvmorg-3.1.0-rc1 |
|
#
c202b280 |
| 14-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add an AttributedStmt type to represent a statement with C++11 attributes attached. Since we do not support any attributes which appertain to a statement (yet), testing of this is necessarily quite m
Add an AttributedStmt type to represent a statement with C++11 attributes attached. Since we do not support any attributes which appertain to a statement (yet), testing of this is necessarily quite minimal.
Patch by Alexander Kornienko!
llvm-svn: 154723
show more ...
|
#
0c27e4b3 |
| 11-Apr-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[libclang] Introduce a couple of functions to make it convenient to get at the parameters (and their types) of a function or objc method cursor.
int clang_Cursor_getNumArguments(CXCursor C); CXCurso
[libclang] Introduce a couple of functions to make it convenient to get at the parameters (and their types) of a function or objc method cursor.
int clang_Cursor_getNumArguments(CXCursor C); CXCursor clang_Cursor_getArgument(CXCursor C, unsigned i);
rdar://11201527
llvm-svn: 154523
show more ...
|
#
c238f06a |
| 10-Apr-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[libclang] For clang_getOverriddenCursors make sure to report overridden objc methods for methods in categories of super classes. rdar://11220358
llvm-svn: 154436
|
#
9d7c0fef |
| 10-Apr-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[code-complete] Introduce CodeCompletionTUInfo which will be used for caching code-completion related strings specific to a translation unit (ASTContext and related data)
CodeCompletionAllocator doe
[code-complete] Introduce CodeCompletionTUInfo which will be used for caching code-completion related strings specific to a translation unit (ASTContext and related data)
CodeCompletionAllocator does such limited caching, by caching the name assigned to a DeclContext*, but that is not the appropriate place since that object has a lifetime that can extend beyond that of an ASTContext.
Introduce CodeCompletionTUInfo which will be always tied to a translation unit to do this kind of caching and move the caching of CodeCompletionAllocator into this object, and propagate it to all the places where it will be needed.
The plan is to extend the caching where appropriate, using CodeCompletionTUInfo, to avoid re-calculating code-completion strings.
Part of rdar://10796159.
llvm-svn: 154408
show more ...
|
#
113bee05 |
| 10-Mar-2012 |
John McCall <rjmccall@apple.com> |
Remove BlockDeclRefExpr and introduce a bit on DeclRefExpr to track whether the referenced declaration comes from an enclosing local context. I'm amenable to suggestions about the exact meaning of t
Remove BlockDeclRefExpr and introduce a bit on DeclRefExpr to track whether the referenced declaration comes from an enclosing local context. I'm amenable to suggestions about the exact meaning of this bit.
llvm-svn: 152491
show more ...
|
#
bfb2425c |
| 08-Mar-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[libclang] Enhance clang_getOverriddenCursors.
Basically the current design is: -for an implementation method, show as overridden the interface method. This is not useful, and is inconsistent with
[libclang] Enhance clang_getOverriddenCursors.
Basically the current design is: -for an implementation method, show as overridden the interface method. This is not useful, and is inconsistent with the C++ side -for an interface method, show as overridden the protocols methods (this is desirable) and the methods from the categories; methods from categories are not useful since they are considered the same method (same USR). -If there is a protocol method or category method reported, it does not check the super class for overridden methods. This is really problematic since overridden methods from super class is what we want to give back.
Change clang_getOverriddenCursors to show as overridden any method in the class's base class, its protocols, or its categories' protocols, that has the same selector and is of the same kind (class or instance). If no such method exists, the search continues to the class's superclass, its protocols, and its categories, and so on. A method from an Objective-C implementation is considered to override the same methods as its corresponding method in the interface.
rdar://10967206
llvm-svn: 152270
show more ...
|
#
c67fdd4e |
| 07-Mar-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
AST representation for user-defined literals, plus just enough of semantic analysis to make the AST representation testable. They are represented by a new UserDefinedLiteral AST node, which is a suga
AST representation for user-defined literals, plus just enough of semantic analysis to make the AST representation testable. They are represented by a new UserDefinedLiteral AST node, which is a sugared CallExpr. All semantic properties, including full CodeGen support, are achieved for free by this representation.
UserDefinedLiterals can never be dependent, so no custom instantiation behavior is required. They are mangled as if they were direct calls to the underlying literal operator. This matches g++'s apparent behavior (but not its actual mangling, which is broken for literal-operator-ids).
User-defined *string* literals are now fully-operational, but the semantic analysis is quite hacky and needs more work. No other forms of user-defined literal are created yet, but the AST support for them is present.
This patch committed after midnight because we had already hit the quota for new kinds of literal yesterday.
llvm-svn: 152211
show more ...
|
#
77006f68 |
| 06-Mar-2012 |
Ted Kremenek <kremenek@apple.com> |
And libclang cursor/indexing support for new Objective-C NSArray/NSDictionary/NSNumber literals.
llvm-svn: 152138
|
#
29c42f2a |
| 24-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Implement a new type trait __is_trivially_constructible(T, Args...) that provides the behavior of the C++11 library trait std::is_trivially_constructible<T, Args...>, which can't be implemented purel
Implement a new type trait __is_trivially_constructible(T, Args...) that provides the behavior of the C++11 library trait std::is_trivially_constructible<T, Args...>, which can't be implemented purely as a library.
Since __is_trivially_constructible can have zero or more arguments, I needed to add Yet Another Type Trait Expression Class, this one handling arbitrary arguments. The next step will be to migrate UnaryTypeTrait and BinaryTypeTrait over to this new, more general TypeTrait class.
Fixes the Clang side of <rdar://problem/10895483> / PR12038.
llvm-svn: 151352
show more ...
|
#
3009383b |
| 15-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Implement indexing support for lambdas in libclang (both kinds), as well as improving the RecursiveASTVisitor's walk of lambda expressions.
llvm-svn: 150549
|
#
e31e606f |
| 07-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Introduce basic ASTs for lambda expressions. This covers: - Capturing variables by-reference and by-copy within a lambda - The representation of lambda captures - The creation of the non-static
Introduce basic ASTs for lambda expressions. This covers: - Capturing variables by-reference and by-copy within a lambda - The representation of lambda captures - The creation of the non-static data members in the lambda class that store the captured variables - The initialization of the non-static data members from the captured variables - Pretty-printing lambda expressions
There are a number of FIXMEs, both explicit and implied, including: - Creating a field for a capture of 'this' - Improved diagnostics for initialization failures when capturing variables by copy - Dealing with temporaries created during said initialization - Template instantiation - AST (de-)serialization - Binding and returning the lambda expression; turning it into a proper temporary - Lots and lots of semantic constraints - Parameter pack captures
llvm-svn: 149977
show more ...
|
#
7890821b |
| 17-Jan-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[libclang] Make clang_getCursorCompletionString not depend on the ASTUnit having a Sema.
This allows it to work when Sema is not available, like when loading AST files.
llvm-svn: 148279
|
#
173e9113 |
| 10-Dec-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[libclang] Add defensive checks to make sure we don't try to dereference a null pointer after getCursorDecl() is called. rdar://10298421.
llvm-svn: 146312
|
#
fa469d0e |
| 09-Dec-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[libclang] Make sure we don't try to handle a CXCursor_NoDeclFound passed to clang_findReferencesInFile.
llvm-svn: 146211
|
#
66f433a7 |
| 06-Dec-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[libclang] API enhancements by Joe Groff!
- Exposes a CXType_Vector type kind for vector types. - Adds generalized versions of the clang_getArrayElementType and clang_getArraySize functions, named c
[libclang] API enhancements by Joe Groff!
- Exposes a CXType_Vector type kind for vector types. - Adds generalized versions of the clang_getArrayElementType and clang_getArraySize functions, named clang_getElementType and clang_getNumElements, which work on array, vector, or complex types. - Adds additional functions for querying function types. clang_isFunctionTypeVariadic returns true if a function type is variadic. clang_getFunctionCallingConv returns an enumeration value indicating the calling convention of the function type. clang_getNumArgTypes returns the number of static argument types, and clang_getArgType gets the type of an argument. - Adds a clang_getTypedefDeclUnderlyingType function to get the underlying type from a TypedefDecl cursor. - Adds a clang_getEnumDeclIntegerType function to get the integer type from an EnumDecl cursor. - Adds clang_getEnumConstantDeclValue and clang_getEnumConstantDeclUnsignedValue functions to get the value of an EnumConstantDecl as a signed or unsigned long long, respectively. - Exposes a CXCursor_AsmLabelAttr cursor kind for __asm__("label") attributes. - Alters clang_getCursorSpelling to return the label value for AsmLabelAttr-kind cursors.
llvm-svn: 145972
show more ...
|
#
4c910b14 |
| 22-Nov-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[libclang] Indexing API: Support C++ symbols.
llvm-svn: 145058
|
#
effdbf55 |
| 18-Nov-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[libclang] Indexing API:
-For indexDeclaration, also pass the declaration attributes as an array of cursors. -Rename CXIndexOpt_OneRefPerFile -> CXIndexOpt_SuppressRedundantRefs, and only pass a r
[libclang] Indexing API:
-For indexDeclaration, also pass the declaration attributes as an array of cursors. -Rename CXIndexOpt_OneRefPerFile -> CXIndexOpt_SuppressRedundantRefs, and only pass a reference if a declaration/definition does not exist in the file. -Other fixes.
llvm-svn: 144942
show more ...
|
Revision tags: llvmorg-3.0.0, llvmorg-3.0.0-rc4, llvmorg-3.0.0-rc3 |
|
#
fe96e0b6 |
| 06-Nov-2011 |
John McCall <rjmccall@apple.com> |
Change the AST representation of operations on Objective-C property references to use a new PseudoObjectExpr expression which pairs a syntactic form of the expression with a set of semantic expressio
Change the AST representation of operations on Objective-C 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
show more ...
|
Revision tags: llvmorg-3.0.0-rc2 |
|
#
deb4a2be |
| 25-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement support for dependent Microsoft __if_exists/__if_not_exists statements. As noted in the documentation for the AST node, the semantics of __if_exists/__if_not_exists are somewhat different f
Implement support for dependent Microsoft __if_exists/__if_not_exists 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
show more ...
|
Revision tags: llvmorg-3.0.0-rc1 |
|
#
dc199a31 |
| 17-Oct-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[libclang] Introduce a new high level API for indexing clients that assumes more of the work involved in indexing a translation unit and simplifies client implementations.
Only C/ObjC for now, C++ (
[libclang] Introduce a new high level API for indexing clients that assumes 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
show more ...
|
#
ca98f2a6 |
| 13-Oct-2011 |
Erik Verbruggen <erikjv@me.com> |
Allow for annotate attributes after access specifiers. When such attributes are found, propagate them to subsequent declarations.
llvm-svn: 141861
|