| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
| |
TypeLoc records for declarations; it should not be necessary to represent it
directly in the type system.
Please complain if you were using these classes and feel you can't replicate
previous functionality using the TypeLoc API.
llvm-svn: 84222
|
|
|
|
|
|
|
| |
assume that PCH files from different Clang revisions are not
compatible. Addresses <rdar://problem/7266572>.
llvm-svn: 83323
|
|
|
|
|
|
|
|
|
| |
This is used only for keeping detailed type source information for protocol references,
it should not participate in the semantics of the type system.
Its protocol list is not canonicalized.
llvm-svn: 83093
|
|
|
|
|
|
|
|
| |
Type hierarchy. Demote 'volatile' to extended-qualifier status. Audit our
use of qualifiers and fix a few places that weren't dealing with qualifiers
quite right; many more remain.
llvm-svn: 82705
|
|
|
|
| |
llvm-svn: 82435
|
|
|
|
| |
llvm-svn: 81346
|
|
|
|
|
|
|
|
|
|
| |
order because it was doing so while iterating over a densemap.
There are still similar problems in other places, for example
WeakUndeclaredIdentifiers is still written to the PCH file in a nondeterminstic
order, and we emit warnings about #pragma weak in nondeterminstic order.
llvm-svn: 81236
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
directly in the AST. The current thinking is to create these
only in C++ mode for efficiency. But for now, they're not being
created at all; patch to follow.
This will let us do things like verify that tags match during
template instantation, as well as signal that an elaborated type
specifier was used for clients that actually care.
Optimally, the TypeLoc hierarchy should be adjusted to carry tag
location information as well.
llvm-svn: 81057
|
|
|
|
| |
llvm-svn: 80916
|
|
|
|
| |
llvm-svn: 80163
|
|
|
|
|
|
| |
- There is lots of non-endian safe code in here... :/
llvm-svn: 79905
|
|
|
|
|
|
| |
- Primarily to discourage clients form making decisions based on the string.
llvm-svn: 79901
|
|
|
|
| |
llvm-svn: 79868
|
|
|
|
| |
llvm-svn: 79782
|
|
|
|
|
|
|
| |
types that are preloaded by the PCH file. Fixes PCH breakage
introduced in r79248.
llvm-svn: 79583
|
|
|
|
|
|
| |
function's return
llvm-svn: 78541
|
|
|
|
|
|
|
|
| |
PackedAttr now only represents __attribute__((packed)).
This is necessary because #pragma pack and __attribute__((packed)) have different semantics. No functionality change yet, but this lays the groundwork for fixing a record layout bug.
llvm-svn: 78483
|
|
|
|
| |
llvm-svn: 77291
|
|
|
|
|
|
| |
Use ObjCInterfaceDecl::getCategoryClassMethod() and ObjCInterfaceDecl::getCategoryInstanceMethod() for the same functionality.
llvm-svn: 76510
|
|
|
|
| |
llvm-svn: 76321
|
|
|
|
|
|
|
|
|
|
|
|
| |
pseudo built-in types, since Sema still injects a typedef for recognition (i.e. they aren't truly built-ins from a parser perspective).
This removes the static data/methods on ObjCObjectPointerType while preserving the nice API (no need to fiddle with ASTContext:-).
This patch also adds Type::isObjCBuiltinType().
This should be the last fairly large patch related to recrafting the ObjC type system. The follow-on patches should be fairly small.
llvm-svn: 75808
|
|
|
|
|
|
| |
an incremental patch
llvm-svn: 75622
|
|
|
|
|
|
|
|
|
|
|
|
| |
The idea is to segregate Objective-C "object" pointers from general C pointers (utilizing the recently added ObjCObjectPointerType). The fun starts in Sema::GetTypeForDeclarator(), where "SomeInterface *" is now represented by a single AST node (rather than a PointerType whose Pointee is an ObjCInterfaceType). Since a significant amount of code assumed ObjC object pointers where based on C pointers/structs, this patch is very tedious. It should also explain why it is hard to accomplish this in smaller, self-contained patches.
This patch does most of the "heavy lifting" related to moving from PointerType->ObjCObjectPointerType. It doesn't include all potential "cleanups". The good news is additional cleanups can be done later (some are noted in the code). This patch is so large that I didn't want to include any changes that are purely aesthetic.
By making the ObjC types truly built-in, they are much easier to work with (and require fewer "hacks"). For example, there is no need for ASTContext::isObjCIdStructType() or ASTContext::isObjCClassStructType()! We believe this change (and the follow-up cleanups) will pay dividends over time.
Given the amount of code change, I do expect some fallout from this change (though it does pass all of the clang tests). If you notice any problems, please let us know asap! Thanks.
llvm-svn: 75314
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
FILE type, rather than using name lookup to find FILE within the
translation unit. Within precompiled headers, FILE is treated as yet
another "special type" (like __builtin_va_list).
This change should provide a performance improvement (not verified),
since the lookup into the translation unit declaration
forces the (otherwise unneeded) construction of a large hash table.
More importantly, with precompiled headers, the construction
of that table requires deserializing most of the top-level
declarations from the precompiled header, which are then unused.
Fixes PR 4509.
llvm-svn: 74911
|
|
|
|
|
|
|
|
|
|
|
|
| |
with a particular system root directory and can be used with a different
system root directory when the headers it depends on have been installed.
Relocatable precompiled headers rewrite the file names of the headers used
when generating the PCH file into the corresponding file names of the
headers available when using the PCH file.
Addresses <rdar://problem/7001604>.
llvm-svn: 74885
|
|
|
|
|
|
| |
from Enea Zaffanella!
llvm-svn: 74831
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
declaration in the AST.
The new ASTContext::getCommentForDecl function searches for a comment
that is attached to the given declaration, and returns that comment,
which may be composed of several comment blocks.
Comments are always available in an AST. However, to avoid harming
performance, we don't actually parse the comments. Rather, we keep the
source ranges of all of the comments within a large, sorted vector,
then lazily extract comments via a binary search in that vector only
when needed (which never occurs in a "normal" compile).
Comments are written to a precompiled header/AST file as a blob of
source ranges. That blob is only lazily loaded when one requests a
comment for a declaration (this never occurs in a "normal" compile).
The indexer testbed now supports comment extraction. When the
-point-at location points to a declaration with a Doxygen-style
comment, the indexer testbed prints the associated comment
block(s). See test/Index/comments.c for an example.
Some notes:
- We don't actually attempt to parse the comment blocks themselves,
beyond identifying them as Doxygen comment blocks to associate them
with a declaration.
- We won't find comment blocks that aren't adjacent to the
declaration, because we start our search based on the location of
the declaration.
- We don't go through the necessary hops to find, for example,
whether some redeclaration of a declaration has comments when our
current declaration does not. Similarly, we don't attempt to
associate a \param Foo marker in a function body comment with the
parameter named Foo (although that is certainly possible).
- Verification of my "no performance impact" claims is still "to be
done".
llvm-svn: 74704
|
|
|
|
|
|
|
| |
Remove ASTContext parameter from DeclContext's methods. This change cascaded down to other Decl's methods and changes to call sites started "escalating".
Timings using pre-tokenized "cocoa.h" showed only a ~1% increase in time run between and after this commit.
llvm-svn: 74506
|
|
|
|
| |
llvm-svn: 74307
|
|
|
|
| |
llvm-svn: 74280
|
|
|
|
| |
llvm-svn: 74221
|
|
|
|
| |
llvm-svn: 74099
|
|
|
|
|
|
|
|
|
|
|
|
| |
representation.
Add a type (ObjCObjectPointerType) and remove a type (ObjCQualifiedIdType).
This large/tedious patch is just a first step. Next step is to remove ObjCQualifiedInterfaceType. After that, I will remove the magic TypedefType for 'id' (installed by Sema). This work will enable various simplifications throughout clang (when dealing with ObjC types).
No functionality change.
llvm-svn: 73649
|
|
|
|
| |
llvm-svn: 72928
|
|
|
|
| |
llvm-svn: 72759
|
|
|
|
|
|
| |
keep the spec out of the canonical type this time. Net effect is currently nothing, because the spec isn't checked anywhere.
llvm-svn: 72498
|
|
|
|
|
|
|
|
| |
This allows me to remove some API that I don't want to carry over to ObjCObjectPointerType.
No functionality change.
llvm-svn: 72475
|
|
|
|
| |
llvm-svn: 72252
|
|
|
|
|
|
| |
Still more to do.
llvm-svn: 72173
|
|
|
|
|
|
| |
-faccess-control option. When we have better support for it, we can enable it by default again.
llvm-svn: 71706
|
|
|
|
|
|
|
| |
message dispatches (and function calls later). No change in
functionality.
llvm-svn: 71683
|
|
|
|
|
|
|
| |
(with -E), we turn the PCH include into an implicit include of the
file from which the PCH file was generated.
llvm-svn: 71534
|
|
|
|
| |
llvm-svn: 71405
|
|
|
|
|
|
|
| |
ns_returns_retained, but do not include the other ownership attributes
we previously had.
llvm-svn: 71308
|
|
|
|
| |
llvm-svn: 71216
|
|
|
|
|
|
| |
until we've had a lot more discussion.
llvm-svn: 71125
|
|
|
|
| |
llvm-svn: 70990
|
|
|
|
| |
llvm-svn: 70952
|
|
|
|
| |
llvm-svn: 70940
|
|
|
|
| |
llvm-svn: 70897
|