| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
decl, create shadow declarations and put them in scope like normal.
Work in progress.
llvm-svn: 89048
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in the DeclaratorInfo, if one is present.
Preserve source information through template instantiation. This is made
more complicated by the possibility that ParmVarDecls don't have DIs, which
is possibly worth fixing in the future.
Also preserve source information for function parameters in ObjC method
declarations.
llvm-svn: 84971
|
|
|
|
|
|
| |
apparently because using directives aren't quite working correctly.
llvm-svn: 83184
|
|
|
|
|
|
| |
same.
llvm-svn: 82088
|
|
|
|
|
|
|
|
| |
all of the parent DeclContexts that aren't represented within the
Scope chain. This fixes some name-lookup problems in out-of-line
definitions of members of nested classes.
llvm-svn: 81451
|
|
|
|
| |
llvm-svn: 81346
|
|
|
|
|
|
|
| |
decl list, and remove some workarounds that were due to this. Thanks to Eli for
pointing this out and providing the test case.
llvm-svn: 80745
|
|
|
|
|
|
| |
existing declaration chains.
llvm-svn: 80636
|
|
|
|
|
|
| |
undeclared classes.
llvm-svn: 80438
|
|
|
|
| |
llvm-svn: 80420
|
|
|
|
| |
llvm-svn: 80415
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
declarations of same, introduce a single AST class and add appropriate bits
(encoded in the namespace) for whether a decl is "real" or not. Much hackery
about previously-declared / not-previously-declared, but it's essentially
mandated by the standard that friends alter lookup, and this is at least
fairly non-intrusive.
Refactor the Sema methods specific to friends for cleaner flow and less nesting.
Incidentally solve a few bugs, but I remain confident that we can put them back.
llvm-svn: 80353
|
|
|
|
| |
llvm-svn: 80336
|
|
|
|
|
|
| |
look at the primary contexts. Thanks to Eli for the test case
llvm-svn: 80212
|
|
|
|
|
|
| |
the AST, and create such declarations.
llvm-svn: 78719
|
|
|
|
|
|
|
|
|
|
|
|
| |
FriendFunctionDecl, and create instances as appropriate.
The design of FriendFunctionDecl is still somewhat up in the air; you can
befriend arbitrary types of functions --- methods, constructors, etc. ---
and it's not clear that this representation captures that very well.
We'll have a better picture when we start consuming this data in access
control.
llvm-svn: 78653
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Type::getAsReferenceType() -> Type::getAs<ReferenceType>()
Type::getAsRecordType() -> Type::getAs<RecordType>()
Type::getAsPointerType() -> Type::getAs<PointerType>()
Type::getAsBlockPointerType() -> Type::getAs<BlockPointerType>()
Type::getAsLValueReferenceType() -> Type::getAs<LValueReferenceType>()
Type::getAsRValueReferenceType() -> Type::getAs<RValueReferenceType>()
Type::getAsMemberPointerType() -> Type::getAs<MemberPointerType>()
Type::getAsReferenceType() -> Type::getAs<ReferenceType>()
Type::getAsTagType() -> Type::getAs<TagType>()
And remove Type::getAsReferenceType(), etc.
This change is similar to one I made a couple weeks ago, but that was partly
reverted pending some additional design discussion. With Doug's pending smart
pointer changes for Types, it seemed natural to take this approach.
llvm-svn: 77510
|
|
|
|
|
|
|
|
|
| |
until Doug Gregor's Type smart pointer code lands (or more discussion occurs).
These methods just call the new Type::getAs<XXX> methods, so we still have
reduced implementation redundancy. Having explicit getAsXXXType() methods makes
it easier to set breakpoints in the debugger.
llvm-svn: 76193
|
|
|
|
|
|
| |
Type::getAsMemberPointerType(), Type::getAsTagType(), and Type::getAsRecordType() with their Type::getAs<XXX> equivalents.
llvm-svn: 76139
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
subclasses.
Timings showed no significant difference before and after the commit.
llvm-svn: 74504
|
|
|
|
|
|
| |
TranslationUnitDecl.
llvm-svn: 74502
|
|
|
|
|
|
|
|
|
| |
The implementations of these methods can Use Decl::getASTContext() to get the ASTContext.
This commit touches a lot of files since call sites for these methods are everywhere.
I used pre-tokenized "carbon.h" and "cocoa.h" headers to do some timings, and there was no real time difference between before the commit and after it.
llvm-svn: 74501
|
|
|
|
|
|
|
|
| |
-Introduce Decl::getASTContext() which returns the reference from the TranslationUnitDecl that it is contained in.
The general idea is that Decls can point to their own ASTContext so that it is no longer required to "manually" keep track and make sure that you pass the correct ASTContext to Decls' methods, e.g. methods like Decl::getAttrs should eventually not require a ASTContext parameter.
llvm-svn: 74434
|
|
|
|
| |
llvm-svn: 74269
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
templates.
For example, this now type-checks (but does not instantiate the body
of deref<int>):
template<typename T> T& deref(T* t) { return *t; }
void test(int *ip) {
int &ir = deref(ip);
}
Specific changes/additions:
* Template argument deduction from a call to a function template.
* Instantiation of a function template specializations (just the
declarations) from the template arguments deduced from a call.
* FunctionTemplateDecls are stored directly in declaration contexts
and found via name lookup (all forms), rather than finding the
FunctionDecl and then realizing it is a template. This is
responsible for most of the churn, since some of the core
declaration matching and lookup code assumes that all functions are
FunctionDecls.
llvm-svn: 74213
|
|
|
|
| |
llvm-svn: 73812
|
|
|
|
| |
llvm-svn: 73702
|
|
|
|
|
|
| |
parameter packs.
llvm-svn: 73272
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
we have the basics of declaring and storing class template partial
specializations, matching class template partial specializations at
instantiation time via (limited) template argument deduction, and
using the class template partial specialization's pattern for
instantiation.
This patch is enough to make a simple is_pointer type trait work, but
not much else.
llvm-svn: 72662
|
|
|
|
| |
llvm-svn: 72637
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
given DeclContext is dependent on type parameters. Use this to
properly determine whether a TagDecl is dependent; previously, we were
missing the case where the TagDecl is a local class of a member
function of a class template (phew!).
Also, make sure that, when we instantiate declarations within a member
function of a class template (or a function template, eventually),
that we add those declarations to the "instantiated locals" map so
that they can be found when instantiating declaration references.
Unfortunately, I was not able to write a useful test for this change,
although the assert() that fires when uncommenting the FIXME'd line in
test/SemaTemplate/instantiate-declref.cpp tells the "experienced user"
that we're now doing the right thing.
llvm-svn: 72526
|
|
|
|
|
|
| |
builds to work (PR4088).
llvm-svn: 70269
|
|
|
|
|
|
| |
can't track down.
llvm-svn: 70155
|
|
|
|
| |
llvm-svn: 69960
|
|
|
|
|
|
|
|
|
|
|
| |
good for uniformity is good for PCH (or is it the other way around?).
As part of this, make ObjCImplDecl inherit from NamedDecl (since
ObjCImplementationDecls now need to have names so that they can be
found). This brings ObjCImplDecl very, very close to
ObjCContainerDecl; we may be able to merge them soon.
llvm-svn: 69941
|
|
|
|
|
|
|
| |
cleanup. Aside from a minor tweak to the PCH file format, no
functionality change.
llvm-svn: 68793
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
de-serialization of abstract syntax trees.
PCH support serializes the contents of the abstract syntax tree (AST)
to a bitstream. When the PCH file is read, declarations are serialized
as-needed. For example, a declaration of a variable "x" will be
deserialized only when its VarDecl can be found by a client, e.g.,
based on name lookup for "x" or traversing the entire contents of the
owner of "x".
This commit provides the framework for serialization and (lazy)
deserialization, along with support for variable and typedef
declarations (along with several kinds of types). More
declarations/types, along with important auxiliary structures (source
manager, preprocessor, etc.), will follow.
llvm-svn: 68732
|
|
|
|
|
|
| |
No functionality change (really).
llvm-svn: 68726
|
|
|
|
|
|
|
|
| |
StoredDeclsMap, instead of using the it's-an-array-or-its-a-map
trick. I'll verify that performance isn't impacted later; for now, I
need the common representation.
llvm-svn: 68715
|
|
|
|
| |
llvm-svn: 68586
|
|
|
|
| |
llvm-svn: 68548
|
|
|
|
|
|
|
|
| |
Simplify the addition of a case statement to a switch.
Fix -print-stats for attribute-qualified types.
llvm-svn: 68522
|
|
|
|
| |
llvm-svn: 67991
|
|
|
|
|
|
| |
llvm::PointerUnion class.
llvm-svn: 67988
|
|
|
|
| |
llvm-svn: 67980
|
|
|
|
|
|
| |
just like namespace decls.
llvm-svn: 67963
|
|
|
|
|
|
| |
points within contexts not scopes.
llvm-svn: 67919
|
|
|
|
|
|
| |
instead of a load + large inlined switch.
llvm-svn: 67864
|
|
|
|
| |
llvm-svn: 67861
|