| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
input and output types when the smaller value isn't mentioned in the
asm string. Extend this support from integers to also allowing
fp values to be mismatched (if not mentioned in the asm string).
llvm-svn: 102188
|
|
|
|
|
|
| |
if the type isn't exactly the same as the container class. Fixes PR6783.
llvm-svn: 102186
|
|
|
|
|
|
|
| |
declaration that this typedef gives the tag a name. Fixes a problem
uncovered by Boost.GIL (Generic Image Library).
llvm-svn: 102180
|
|
|
|
| |
llvm-svn: 102179
|
|
|
|
| |
llvm-svn: 102178
|
|
|
|
|
|
| |
same", which seems to break most C++ nightly test apps.
llvm-svn: 102174
|
|
|
|
| |
llvm-svn: 102169
|
|
|
|
|
|
| |
BuildImplicitBaseInitializer and BuildImplicitMemberInitializer.
llvm-svn: 102166
|
|
|
|
| |
llvm-svn: 102165
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
way that C does. Among other differences, elaborated type specifiers
are defined to skip "non-types", which, as you might imagine, does not
include typedefs. Rework our use of IDNS masks to capture the semantics
of different kinds of declarations better, and remove most current lookup
filters. Removing the last remaining filter is more complicated and will
happen in a separate patch.
Fixes PR 6885 as well some spectrum of unfiled bugs.
llvm-svn: 102164
|
|
|
|
| |
llvm-svn: 102162
|
|
|
|
|
|
| |
code. Make BuildImplicitBaseInitializer return a boolean instead.
llvm-svn: 102159
|
|
|
|
| |
llvm-svn: 102147
|
|
|
|
|
|
|
| |
aren't and never were used. There's a gap in the bit pattern for IDNS
now, but I'm sure *someone* will fill it.
llvm-svn: 102143
|
|
|
|
|
|
|
|
|
|
| |
statement, i.e.,
for (element in collection) {
// do something
}
llvm-svn: 102138
|
|
|
|
| |
llvm-svn: 102134
|
|
|
|
| |
llvm-svn: 102133
|
|
|
|
|
|
|
|
|
|
| |
address of overloaded function, instead of assuming that a nested name
specifier was used. A nested name specifier is not required for static
functions.
Fixes PR6886.
llvm-svn: 102107
|
|
|
|
|
|
|
| |
template instantiation, since they cannot be dependent or have
dependent parts. Handle them the simple way.
llvm-svn: 102094
|
|
|
|
|
|
|
|
| |
method being called at template definition time, retain that method
and pass it through to type-checking. We will not perform any lookup
for the method during template instantiation.
llvm-svn: 102081
|
|
|
|
|
|
|
| |
Sema::BuildClassMessage; we weren't using it, and template
instantiation was faking it anyway.
llvm-svn: 102074
|
|
|
|
|
|
| |
functionality change
llvm-svn: 102073
|
|
|
|
|
|
|
|
|
|
|
|
| |
support dependent receivers for class and instance messages, along
with dependent message arguments (of course), and check as much as we
can at template definition time.
This commit also deals with a subtle aspect of template instantiation
in Objective-C++, where the type 'T *' can morph from a dependent
PointerType into a non-dependent ObjCObjectPointer type.
llvm-svn: 102071
|
|
|
|
|
|
|
| |
look for the const on the base type rather than on the top-level
type. Fixes PR6495 properly.
llvm-svn: 102066
|
|
|
|
|
|
| |
elaborated-type-specifiers. Patch by Enea Zaffanella!
llvm-svn: 102065
|
|
|
|
|
|
| |
self-host :)
llvm-svn: 102050
|
|
|
|
|
|
| |
failure on bootstrap.
llvm-svn: 102043
|
|
|
|
| |
llvm-svn: 102040
|
|
|
|
|
|
|
|
|
| |
in a throw expression. Use EmitAnyExprToMem to emit the throw expression,
which magically elides the final copy-constructor call (which raises a new
strict-compliance bug, but baby steps). Give __cxa_throw a destructor pointer
if the exception type has a non-trivial destructor.
llvm-svn: 102039
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
method parameter, provide a note pointing at the parameter itself so
the user does not have to manually look for the function/method being
called and match up parameters to arguments. For example, we now get:
t.c:4:5: warning: incompatible pointer types passing 'long *' to
parameter of
type 'int *' [-pedantic]
f(long_ptr);
^~~~~~~~
t.c:1:13: note: passing argument to parameter 'x' here
void f(int *x);
^
llvm-svn: 102038
|
|
|
|
| |
llvm-svn: 102037
|
|
|
|
|
|
|
|
|
| |
during message sends) over to the new initialization code and away
from the C-only CheckSingleAssignmentConstraints. The enables the use
of C++ types in method parameters and message arguments, as well as
unifying more initialiation code overall.
llvm-svn: 102035
|
|
|
|
|
|
|
|
|
| |
Objective-C class message expression into a type from the parser
(which was doing so in two places) to Action::getObjCMessageKind()
which, in the case of Sema, reduces the number of name lookups we need
to perform.
llvm-svn: 102026
|
|
|
|
| |
llvm-svn: 102025
|
|
|
|
|
|
| |
to reduce nesting. No functionality change.
llvm-svn: 102022
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sends. Major changes include:
- Expanded the interface from two actions (ActOnInstanceMessage,
ActOnClassMessage), where ActOnClassMessage also handled sends to
"super" by checking whether the identifier was "super", to three
actions (ActOnInstanceMessage, ActOnClassMessage,
ActOnSuperMessage). Code completion has the same changes.
- The parser now resolves the type to which we are sending a class
message, so ActOnClassMessage now accepts a TypeTy* (rather than
an IdentifierInfo *). This opens the door to more interesting
types (for Objective-C++ support).
- Split ActOnInstanceMessage and ActOnClassMessage into parser
action functions (with their original names) and semantic
functions (BuildInstanceMessage and BuildClassMessage,
respectively). At present, this split is onyl used by
ActOnSuperMessage, which decides which kind of super message it
has and forwards to the appropriate Build*Message. In the future,
Build*Message will be used by template instantiation.
- Use getObjCMessageKind() within the disambiguation of Objective-C
message sends vs. array designators.
Two notes about substandard bits in this patch:
- There is some redundancy in the code in ParseObjCMessageExpr and
ParseInitializerWithPotentialDesignator; this will be addressed
shortly by centralizing the mapping from identifiers to type names
for the message receiver.
- There is some #if 0'd code that won't likely ever be used---it
handles the use of 'super' in methods whose class does not have a
superclass---but could be used to model GCC's behavior more
closely. This code will die in my next check-in, but I want it in
Subversion.
llvm-svn: 102021
|
|
|
|
|
|
| |
base or not. Use this in CheckConstructorAccess.
llvm-svn: 102020
|
|
|
|
|
|
| |
property synthesis is using a super class ivar.
llvm-svn: 102011
|
|
|
|
|
|
| |
report different diagnostics depending on which entity is being initialized.
llvm-svn: 102010
|
|
|
|
| |
llvm-svn: 101994
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
expressions, to improve source-location information, clarify the
actual receiver of the message, and pave the way for proper C++
support. The ObjCMessageExpr node represents four different kinds of
message sends in a single AST node:
1) Send to a object instance described by an expression (e.g., [x method:5])
2) Send to a class described by the class name (e.g., [NSString method:5])
3) Send to a superclass class (e.g, [super method:5] in class method)
4) Send to a superclass instance (e.g., [super method:5] in instance method)
Previously these four cases where tangled together. Now, they have
more distinct representations. Specific changes:
1) Unchanged; the object instance is represented by an Expr*.
2) Previously stored the ObjCInterfaceDecl* referring to the class
receiving the message. Now stores a TypeSourceInfo* so that we know
how the class was spelled. This both maintains typedef information
and opens the door for more complicated C++ types (e.g., dependent
types). There was an alternative, unused representation of these
sends by naming the class via an IdentifierInfo *. In practice, we
either had an ObjCInterfaceDecl *, from which we would get the
IdentifierInfo *, or we fell into the case below...
3) Previously represented by a class message whose IdentifierInfo *
referred to "super". Sema and CodeGen would use isStr("super") to
determine if they had a send to super. Now represented as a
"class super" send, where we have both the location of the "super"
keyword and the ObjCInterfaceDecl* of the superclass we're
targetting (statically).
4) Previously represented by an instance message whose receiver is a
an ObjCSuperExpr, which Sema and CodeGen would check for via
isa<ObjCSuperExpr>(). Now represented as an "instance super" send,
where we have both the location of the "super" keyword and the
ObjCInterfaceDecl* of the superclass we're targetting
(statically). Note that ObjCSuperExpr only has one remaining use in
the AST, which is for "super.prop" references.
The new representation of ObjCMessageExpr is 2 pointers smaller than
the old one, since it combines more storage. It also eliminates a leak
when we loaded message-send expressions from a precompiled header. The
representation also feels much cleaner to me; comments welcome!
This patch attempts to maintain the same semantics we previously had
with Objective-C message sends. In several places, there are massive
changes that boil down to simply replacing a nested-if structure such
as:
if (message has a receiver expression) {
// instance message
if (isa<ObjCSuperExpr>(...)) {
// send to super
} else {
// send to an object
}
} else {
// class message
if (name->isStr("super")) {
// class send to super
} else {
// send to class
}
}
with a switch
switch (E->getReceiverKind()) {
case ObjCMessageExpr::SuperInstance: ...
case ObjCMessageExpr::Instance: ...
case ObjCMessageExpr::SuperClass: ...
case ObjCMessageExpr::Class:...
}
There are quite a few places (particularly in the checkers) where
send-to-super is effectively ignored. I've placed FIXMEs in most of
them, and attempted to address send-to-super in a reasonable way. This
could use some review.
llvm-svn: 101972
|
|
|
|
| |
llvm-svn: 101962
|
|
|
|
| |
llvm-svn: 101960
|
|
|
|
| |
llvm-svn: 101952
|
|
|
|
|
|
|
|
| |
into ContentCache::getBuffer. This allows it to produce
diagnostics on the broken #include line instead of without a
location.
llvm-svn: 101939
|
|
|
|
|
|
| |
objective-c methods. Fixes radar 7875968.
llvm-svn: 101935
|
|
|
|
| |
llvm-svn: 101920
|
|
|
|
|
|
| |
@encode expression.
llvm-svn: 101907
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
we will print with each error that occurs during template
instantiation. When the backtrace is longer than that, we will print
N/2 of the innermost backtrace entries and N/2 of the outermost
backtrace entries, then skip the middle entries with a note such as:
note: suppressed 2 template instantiation contexts; use
-ftemplate-backtrace-limit=N to change the number of template
instantiation entries shown
This should eliminate some excessively long backtraces that aren't
providing any value.
llvm-svn: 101882
|
|
|
|
| |
llvm-svn: 101871
|