| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
|
|
|
| |
LookupDeclInContext().
The previous interface was very confusing. This is much more explicit, which will be easier to understand/optimize/convert.
The plan is to eventually deprecate both of these functions. For now, I'm focused on performance.
llvm-svn: 63256
|
| |
|
|
|
|
|
|
|
| |
.def file for each library. This means that adding a diagnostic
to sema doesn't require all the other libraries to be rebuilt.
Patch by Anders Johnsen!
llvm-svn: 63111
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
that every declaration lives inside a DeclContext.
Moved several things that don't have names but were ScopedDecls (and,
therefore, NamedDecls) to inherit from Decl rather than NamedDecl,
including ObjCImplementationDecl and LinkageSpecDecl. Now, we don't
store empty DeclarationNames for these things, nor do we try to insert
them into DeclContext's lookup structure.
The serialization tests are temporarily disabled. We'll re-enable them
once we've sorted out the remaining ownership/serialiazation issues
between DeclContexts and TranslationUnion, DeclGroups, etc.
llvm-svn: 62562
|
| |
|
|
|
|
| |
that rules for assignment.
llvm-svn: 62524
|
| |
|
|
| |
llvm-svn: 62431
|
| |
|
|
| |
llvm-svn: 62122
|
| |
|
|
|
|
|
|
| |
assigned to when it has user declared setter method
defined in the class implementation (but no declaration in
the class itself).
llvm-svn: 62098
|
| |
|
|
|
|
| |
This completes the ObjCContainerDecl AST cleanup (for now).
llvm-svn: 62037
|
| |
|
|
|
|
| |
in designated protocols lazily.
llvm-svn: 62007
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of ScopedDecls (using the new ScopedDecl::NextDeclInScope
pointer). Performance-wise:
- It's a net win in memory utilization, since DeclContext is now one
pointer smaller than it used to be (std::vectors are typically 3
pointers; we now use 2 pointers) and
- Parsing Cocoa.h with -fsyntax-only (with a Release-Asserts Clang)
is about 1.9% faster than before, most likely because we no longer
have the memory allocations and copying associated with the
std::vector.
I'll re-enable serialization of DeclContexts once I've sorted out the
NextDeclarator/NextDeclInScope question.
llvm-svn: 62001
|
| |
|
|
|
|
|
|
|
| |
filters the decls seen by decl_iterator with two criteria: the dynamic
type of the declaration and a run-time predicate described by a member
function. This simplifies EnumDecl, RecordDecl, and ObjCContainerDecl
considerably. It has no measurable performance impact.
llvm-svn: 61994
|
| |
|
|
|
|
|
|
|
| |
Add isa/cast/dyncast support for ObjCContainerDecl.
Renamed classprop_iterator/begin/end to prop_iterator/begin/end (the class prefix was confusing).
More simplifications to Sema::ActOnAtEnd()...
Added/changed some FIXME's as a result of the above work.
llvm-svn: 61988
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rewrite @class declarations that showed up within linkage
specifications because those @class declarations never made it any
place where the rewriter could find them.
Moved all of the ObjC*Decl nodes over to ScopedDecls, so that they can
live in the appropriate top-level or transparent DeclContext near the
top level, e.g., TranslationUnitDecl or LinkageSpecDecl. Objective-C
declarations now show up in a traversal of the declarations in a
DeclContext (they didn't before!). This way, the rewriter finds all
Objective-C declarations within linkage specifications.
llvm-svn: 61966
|
| |
|
|
|
|
| |
parameter list. This is work in progress.
llvm-svn: 61964
|
| |
|
|
| |
llvm-svn: 61937
|
| |
|
|
|
|
| |
Moved logic to Sema::ProcessPropertyDecl().
llvm-svn: 61936
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- ObjCContainerDecl's (ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl), ObjCCategoryImpl, & ObjCImplementation are all DeclContexts.
- ObjCMethodDecl is now a ScopedDecl (so it can play nicely with DeclContext).
- ObjCContainerDecl now does iteration/lookup using DeclContext infrastructure (no more linear search:-)
- Removed ASTContext argument to DeclContext::lookup(). It wasn't being used and complicated it's use from an ObjC AST perspective.
- Added Sema::ProcessPropertyDecl() and removed Sema::diagnosePropertySetterGetterMismatch().
- Simplified Sema::ActOnAtEnd() considerably. Still more work to do.
- Fixed an incorrect casting assumption in Sema::getCurFunctionOrMethodDecl(), now that ObjCMethodDecl is a ScopedDecl.
- Removed addPropertyMethods from ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl.
This passes all the tests on my machine. Since many of the changes are central to the way ObjC finds it's methods, I expect some fallout (and there are still a handful of FIXME's). Nevertheless, this should be a step in the right direction.
llvm-svn: 61929
|
| |
|
|
|
|
| |
gen issue fix.
llvm-svn: 61901
|
| |
|
|
|
|
| |
nested in the translation unit. This fixes <rdar://problem/6476070>.
llvm-svn: 61832
|
| |
|
|
| |
llvm-svn: 61476
|
| |
|
|
|
|
|
| |
property in a category and to issue diagnostics
for mismatch method in some other cases.
llvm-svn: 61336
|
| |
|
|
|
|
| |
using it in ObjC's method parameter encoding.
llvm-svn: 61293
|
| |
|
|
|
|
|
| |
Note that one test duplicate-ivar-check.m will fail because I
need to re-implement duplicate ivar checking.
llvm-svn: 61154
|
| |
|
|
|
|
| |
Move Sema::ActOnDefs to SemaDeclObjC
llvm-svn: 61126
|
| |
|
|
| |
llvm-svn: 61114
|
| |
|
|
|
|
|
| |
change the semantics. Please correct this if the precedence was
actually supposed to be something different.
llvm-svn: 61099
|
| |
|
|
| |
llvm-svn: 61090
|
| |
|
|
|
|
|
| |
is done. Layout is calculated lazily at code gen type.
This patch changes the name.
llvm-svn: 61054
|
| |
|
|
| |
llvm-svn: 60993
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and separates lexical name lookup from qualified name lookup. In
particular:
* Make DeclContext the central data structure for storing and
looking up declarations within existing declarations, e.g., members
of structs/unions/classes, enumerators in C++0x enums, members of
C++ namespaces, and (later) members of Objective-C
interfaces/implementations. DeclContext uses a lazily-constructed
data structure optimized for fast lookup (array for small contexts,
hash table for larger contexts).
* Implement C++ qualified name lookup in terms of lookup into
DeclContext.
* Implement C++ unqualified name lookup in terms of
qualified+unqualified name lookup (since unqualified lookup is not
purely lexical in C++!)
* Limit the use of the chains of declarations stored in
IdentifierInfo to those names declared lexically.
* Eliminate CXXFieldDecl, collapsing its behavior into
FieldDecl. (FieldDecl is now a ScopedDecl).
* Make RecordDecl into a DeclContext and eliminates its
Members/NumMembers fields (since one can just iterate through the
DeclContext to get the fields).
llvm-svn: 60878
|
| |
|
|
|
|
|
| |
the synthesis is in an implementation of s subclass of
a super class where the property has been declared.
llvm-svn: 60792
|
| |
|
|
|
|
|
|
|
| |
function/array conversion for parameter types.
This fixes <rdar://problem/6424064> checker on xcode: (possible bad AST) can the type of a method parameter really have "isFunctionType() == true"?
and http://llvm.org/bugs/show_bug.cgi?id=2997.
llvm-svn: 60781
|
| |
|
|
|
|
| |
warning as it is allowed in gcc and will break projects.
llvm-svn: 60710
|
| |
|
|
|
|
|
| |
must allow the continuation class to extend it to a 'readwrite'
and 'copy/retain'.
llvm-svn: 60709
|
| |
|
|
|
|
| |
belongs
llvm-svn: 60708
|
| |
|
|
|
|
| |
Bug reported by Chris L.
llvm-svn: 60635
|
| |
|
|
|
|
|
| |
via the category's protocol list1s, with appropriate
diagnsostics and a test case.
llvm-svn: 60634
|
| |
|
|
|
|
| |
type mimatches.
llvm-svn: 60630
|
| |
|
|
| |
llvm-svn: 60629
|
| |
|
|
|
|
| |
testing declaration of properties in categories.
llvm-svn: 60625
|
| |
|
|
|
|
|
| |
attributes. Example would be, readonly, assign or
assign, copy, etc.
llvm-svn: 60620
|
| |
|
|
|
|
|
|
| |
property. It also checks for duplicate use of the same ivar
in two different iproperty implementations. It also caught
an error for a test case used in CodeGen :).
llvm-svn: 60610
|
| |
|
|
|
|
|
| |
(instance/class) Method type checking between category and its implementation.
And a test case for all.
llvm-svn: 60598
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
parameters, with some semantic analysis:
- Template parameters are introduced into template parameter scope
- Complain about template parameter shadowing (except in Microsoft mode)
Note that we leak template parameter declarations like crazy, a
problem we'll remedy once we actually create proper declarations for
templates.
Next up: dependent types and value-dependent/type-dependent
expressions.
llvm-svn: 60597
|
| |
|
|
|
|
|
| |
methods in class and its implementation.
This is work in progress.
llvm-svn: 60573
|
| |
|
|
|
|
| |
property attribute mis-specification.
llvm-svn: 60562
|
| |
|
|
|
|
| |
work in prgress.
llvm-svn: 60430
|
| |
|
|
|
|
|
|
| |
a property. Previous scheme of seaching in interface's list of methods
would not work because this list is not yet constructed. This is in preparation
for doing semantic check on viability of setter/getter method declarations.
llvm-svn: 60386
|
| |
|
|
| |
llvm-svn: 60115
|
| |
|
|
|
|
|
|
| |
Implemented anonymous category (also know as continuation class)
used to override main class's property attribute. This is work in
propgress.
llvm-svn: 60114
|