| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Teach C++'s tentative parsing to handle specializations of Objective-C
class types (e.g., NSArray<NSString *>) as well as Objective-C
protocol qualifiers (id<NSCopying>) by extending type-annotation
tokens to handle this case. As part of this, remove Objective-C
protocol qualifiers from the declaration specifiers, which never
really made sense: instead, provide Sema entry points to make them
part of the type annotation token. Among other things, this properly
diagnoses bogus types such as "<NSCopying> id" which should have been
written as "id <NSCopying>".
Implements template instantiation support for, e.g., NSArray<T>*
in C++. Note that parameterized classes are not templates in the C++
sense, so that cannot (for example) be used as a template argument for
a template template parameter. Part of rdar://problem/6294649.
llvm-svn: 241545
|
|
|
|
|
|
|
|
| |
a getter/setter method annotation.
rdar://13764549
llvm-svn: 183242
|
|
|
|
|
|
|
|
| |
of CXCursor_CXXThisExpr for C++ code.
rdar://13717006
llvm-svn: 180127
|
|
|
|
|
|
|
|
| |
Previously type/storage qualifiers would not be annotated as the declaration they belonged to.
Just use the resulting source range of getRawCursorExtent() which is more correct
than what AnnotateTokensWorker::Visit() was adjusting it to.
llvm-svn: 171774
|
|
|
|
|
|
|
|
|
|
| |
CXCursor_ObjCInstanceMethodDecl/CXCursor_ObjCClassMethodDecl cursor,
return from clang_getCursorLocation the start location of the method name.
rdar://11105223
llvm-svn: 153303
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
for forward references of classes and protocols, this breaks libclang API usage.
rdar://10747438.
llvm-svn: 148861
|
|
|
|
| |
llvm-svn: 148582
|
|
|
|
| |
llvm-svn: 148141
|
|
|
|
| |
llvm-svn: 148138
|
|
|
|
|
|
|
| |
covers both declarations (@class) and definitions (@interface) of an
Objective-C class.
llvm-svn: 147299
|
|
|
|
|
|
| |
from Manuel Holtgrewe!
llvm-svn: 141200
|
|
|
|
|
|
|
|
| |
-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
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 137688
|
|
|
|
| |
llvm-svn: 137660
|
|
|
|
| |
llvm-svn: 137634
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MacroInstantiation -> MacroExpansion rename. Internally, everything is
switched.
Introduce a new cursor kind enum with the new name, but retain the old
name as an alias so that we don't break backwards compatibility.
Also update the debug printing routine to use 'macro expansions' as its
explicitly not guaranteed to be stable, and mechanically switch the test
cases over to that.
llvm-svn: 135140
|
|
|
|
| |
llvm-svn: 132918
|
|
|
|
|
|
| |
libclang. Fixes <rdar://problem/9537904>.
llvm-svn: 132603
|
|
|
|
|
|
| |
keywords for Objective-C+ and C++0x.
llvm-svn: 127253
|
|
|
|
| |
llvm-svn: 122348
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
classes, categories, protocols, and class extensions, where the
methods and properties of these entities would be inserted into the
DeclContext in an ordering that doesn't necessarily reflect source
order. The culprits were Sema::ActOnMethodDeclaration(), which did not
perform the insertion of the just-created method declaration into
the DeclContext for these Objective-C entities, and
Sema::ActOnAtEnd(), which inserted all method declarations at the
*end* of the DeclContext.
With this fix in hand, clean up the code-completion actions for
property setters/getters that worked around this brokenness in the AST.
Fixes <rdar://problem/8062781>, where this problem manifested as poor
token-annotation information, but this would have struck again in many
other places.
llvm-svn: 122347
|
|
|
|
|
|
|
| |
information caused token-annotation to fail in funny ways. Fixes
<rdar://problem/8595386>.
llvm-svn: 122338
|
|
|
|
|
|
|
|
|
| |
@synthesize foo = _foo;
keep track of the location of the ivar ("_foo"). Teach libclang to
visit the ivar as a member reference.
llvm-svn: 119447
|
|
|
|
|
|
|
|
|
|
|
|
| |
we were just getting a range covering only the property name, which is
certainly not correct (and broke token annotation, among other
things).
Also, teach libclang about the relationship between
@synthesize/@dynamic and @property, so we get property name and
cursor-reference information for @synthesize and @dynamic.
llvm-svn: 119409
|
|
|
|
|
|
|
|
|
|
|
| |
declared
within an @implementation, but we have no way to record that information in the AST.
This may cause CursorVisitor to miss these Decls when doing a AST walk.
Fixes <rdar://problem/8595462>.
llvm-svn: 118109
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
entities in the preprocessing record. Previously, we would only end up
getting the first token of a preprocessing record annotated
correctly. For example, given
#include "foo.h"
we would only get the '#' annotated as an inclusion directive; the
'include' and '"foo.h"' tokens would be given the general 'processing
directive' annotation.
Now, we get proper annotations for entities in the preprocessing
record.
llvm-svn: 117001
|
|
|
|
|
|
| |
and protocol expressions. Fixes <rdar://problem/7833565>.
llvm-svn: 115346
|
|
|
|
| |
llvm-svn: 112097
|
|
|
|
|
|
| |
cursors that come before a macro instantiation. Fixes <rdar://problem/7974151>.
llvm-svn: 112096
|
|
|
|
|
|
| |
code. ...", this was a lit bug which should be fixed in r103652.
llvm-svn: 103654
|
|
|
|
|
|
|
|
| |
hopefully
unbreaks the test with lit+Windows.
llvm-svn: 103650
|
|
|
|
| |
llvm-svn: 103615
|
|
|
|
| |
llvm-svn: 103614
|
|
|
|
| |
llvm-svn: 103587
|
|
|
|
|
|
|
|
| |
locations for
many things.
llvm-svn: 103583
|
|
|
|
| |
llvm-svn: 103582
|
|
|
|
|
|
|
|
|
|
| |
location/range in clang_getCursorLocation()/clang_getCursorExtent(). This fixes a horrible bug reported in
<rdar://problem/7961995> and <rdar://problem/7967123> where declarations with attributes
would get grossly annotated with the wrong tokens because the attribute would be interpreted
as if it was a Decl*.
llvm-svn: 103581
|
|
|
|
|
|
|
|
| |
for DeclaratorDecls
when annotating tokens. Fixes <rdar://problem/7971430>.
llvm-svn: 103577
|
|
|
|
|
|
|
|
|
| |
closely matches
clang_getCursor(). Tokens are now annotated with the cursor (for the matching AST element)
that most closely encompasses that token.
llvm-svn: 103064
|
|
|
|
|
|
| |
@encode expression.
llvm-svn: 101907
|
|
|
|
| |
llvm-svn: 98078
|
|
llvm-svn: 98056
|