| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
| |
(Lex to AST).
The member variable is always "LangOpts" and the member function is always "getLangOpts".
Reviewed by Chris Lattner
llvm-svn: 152536
|
|
|
|
|
|
|
|
|
|
| |
@class I;
@implementation I(cat) // crashes here
@end
rdar://10968158
llvm-svn: 151931
|
|
|
|
|
|
|
| |
have matching user defined setter/getter and a warning is issued.
In this case, a fixit note is displayed. // rdar://10267155
llvm-svn: 151766
|
|
|
|
|
|
|
| |
modern meta-data translation by commenting out private ivar
declarations in user source. Also, added several tests.
llvm-svn: 150985
|
|
|
|
|
|
|
|
| |
has been declared in its primary class, superclass,
or in one of their protocols, no need to issue unimplemented method.
// rdar://10823023
llvm-svn: 150206
|
|
|
|
|
|
| |
consistency with NamedDecls.
llvm-svn: 149981
|
|
|
|
|
|
|
| |
moving it from a "special type" to a predefined declaration, as we do
for id, Class, and SEL.
llvm-svn: 148313
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
protocol, record the definition pointer in the canonical declaration
for that entity, and then propagate that definition pointer from the
canonical declaration to all other deserialized declarations. This
approach works well even when deserializing declarations that didn't
know about the original definition, which can occur with modules.
A nice bonus from this definition-deserialization approach is that we
no longer need update records when a definition is added, because the
redeclaration chains ensure that the if any declaration is loaded, the
definition will also get loaded.
llvm-svn: 148223
|
|
|
|
|
|
|
| |
go through a central allocation routine
Decl::AllocateDeserializedDecl(). No actual functionality change (yet).
llvm-svn: 147614
|
|
|
|
|
|
| |
They are no longer needed
llvm-svn: 147419
|
|
|
|
|
|
| |
ObjCProtocolDecl modules forward declarations properly.
llvm-svn: 147415
|
|
|
|
|
|
|
| |
forward declarations and definitions of an Objective-C protocol are
represented within a single chain of ObjCProtocolDecls.
llvm-svn: 147412
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for Objective-C protocols, including:
- Using the first declaration as the canonical declaration
- Using the definition as the primary DeclContext
- Making sure that all declarations have a pointer to the definition
data, and that we know which declaration is the definition
- Serialization support for redeclaration chains and for adding
definitions to already-serialized declarations.
However, note that we're not taking advantage of much of this code
yet, because we're still re-using ObjCProtocolDecls.
llvm-svn: 147410
|
|
|
|
|
|
|
|
|
| |
separately-allocated DefinitionData structure. Introduce various
functions that will help with the separation of declarations from
definitions (isThisDeclarationADefinition(), hasDefinition(),
getDefinition()).
llvm-svn: 147408
|
|
|
|
|
|
|
| |
covers both declarations (@class) and definitions (@interface) of an
Objective-C class.
llvm-svn: 147299
|
|
|
|
|
|
|
| |
building related objc ASTs which require a class definition AST.
These were uncovered when testing objc rewriter.
llvm-svn: 147210
|
|
|
|
|
|
| |
http://llvm.org/docs/CodingStandards.html#ll_virtual_anch
llvm-svn: 146959
|
|
|
|
| |
llvm-svn: 146763
|
|
|
|
|
|
| |
from the corresponding ObjCInterfaceType
llvm-svn: 146740
|
|
|
|
| |
llvm-svn: 146722
|
|
|
|
|
|
|
|
|
|
| |
declarations and definitions) as ObjCInterfaceDecls within the same
redeclaration chain. This new representation matches what we do for
C/C++ variables/functions/classes/templates/etc., and makes it
possible to answer the query "where are all of the declarations of
this class?"
llvm-svn: 146679
|
|
|
|
|
|
|
| |
definition, and implement ObjCInterfaceDecl::getDefinition()
efficiently based on that.
llvm-svn: 146669
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
redeclaration chain for Objective-C classes, including:
- Using the first declaration as the canonical declaration.
- Using the definition as the primary DeclContext
- Making sure that all declarations have a pointer to the definition
data, and the definition knows that it is the definition.
- Serialization support for when a definition gets added to a
declaration that comes from an AST file.
However, note that we're not taking advantage of much of this code
yet, because we're still re-using ObjCInterfaceDecls.
llvm-svn: 146667
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
separately-allocated DefinitionData structure, which we manage the
same way as CXXRecordDecl::DefinitionData. This prepares the way for
making ObjCInterfaceDecls redeclarable, to more accurately model
forward declarations of Objective-C classes and eliminate the mutation
of ObjCInterfaceDecl that causes us serious trouble in the AST reader.
Note that ObjCInterfaceDecl's accessors are fairly robust against
being applied to forward declarations, because Clang (and Sema in
particular) doesn't perform RequireCompleteType/hasDefinition() checks
everywhere it has to. Each of these overly-robust cases is marked with
a FIXME, which we can tackle over time.
llvm-svn: 146644
|
|
|
|
|
|
|
| |
members into ObjCClassDecl, saving ourselves one pointer per forward
declaration.
llvm-svn: 146564
|
|
|
|
| |
llvm-svn: 146213
|
|
|
|
|
|
|
|
| |
'ImplicitInterfaceDecl',
no need to store it in another field.
llvm-svn: 144624
|
|
|
|
|
|
| |
<rdar://problem/10416568>.
llvm-svn: 144572
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of its categories because
it is going to be rewritten (and the chain will be serialized again), otherwise we may form a cycle in its
categories list when deserializing.
Also introduce ASTMutationListener::CompletedObjCForwardRef to notify that a forward reference
was completed; using Decl's isChangedSinceDeserialization/setChangedSinceDeserialization
is bug inducing and kinda gross, we should phase it out.
Fixes infinite loop in rdar://10418538.
llvm-svn: 144465
|
|
|
|
|
|
| |
with ns_consumes_self. Fixes <rdar://problem/10274056>.
llvm-svn: 142909
|
|
|
|
|
|
| |
otherwise lldb will suffer.
llvm-svn: 142471
|
|
|
|
| |
llvm-svn: 142231
|
|
|
|
|
|
| |
reference.
llvm-svn: 142230
|
|
|
|
| |
llvm-svn: 141964
|
|
|
|
|
|
| |
Serialization part will come later.
llvm-svn: 141950
|
|
|
|
|
|
| |
Avoid possible infinite loop when iterating over an ObjCMethod's redeclarations.
llvm-svn: 141946
|
|
|
|
|
|
|
|
| |
-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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of always storing all source locations for the selector identifiers
we check whether all the identifiers are in a "standard" position; "standard" position is
-Immediately before the arguments: -(id)first:(int)x second:(int)y;
-With a space between the arguments: -(id)first: (int)x second: (int)y;
-For nullary selectors, immediately before ';': -(void)release;
In such cases we infer the locations instead of storing them.
llvm-svn: 140989
|
|
|
|
|
|
|
|
| |
objc method decls.
They are not stored in the AST yet.
llvm-svn: 140984
|
|
|
|
|
|
| |
from the selector.
llvm-svn: 140983
|
|
|
|
| |
llvm-svn: 140407
|
|
|
|
| |
llvm-svn: 140367
|
|
|
|
|
|
|
|
|
|
|
|
| |
The initial incentive was to fix a crash when PCH chaining categories
to an interface, but the fix was done in the "modules way" that I hear
is popular with the kids these days.
Each module stores the local chain of categories and we combine them
when the interface is loaded. We also warn if non-dependent modules
introduce duplicate named categories.
llvm-svn: 138926
|
|
|
|
|
|
|
|
|
|
|
| |
Remove
-setClassInterface
-setNextClassCategory
-insertNextClassCategory
and combine them in the Create function.
llvm-svn: 138817
|
|
|
|
|
|
| |
This matches gcc's logic. Second half of PR10661.
llvm-svn: 138730
|
|
|
|
|
|
|
|
|
|
| |
, 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
|
|
|
|
| |
llvm-svn: 137896
|
|
|
|
|
|
|
|
| |
user-declared) as implicit.
This results in libclang ignoring such methods.
llvm-svn: 137852
|
|
|
|
|
|
|
|
| |
LLVM.h imports
them into the clang namespace.
llvm-svn: 135852
|
|
|
|
|
|
| |
where it belongs.
llvm-svn: 135746
|