| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 105751
|
|
|
|
|
|
|
| |
build a new declaration for that tag type that will be visible for
future lookups of that tag.
llvm-svn: 105643
|
|
|
|
| |
llvm-svn: 105525
|
|
|
|
|
|
| |
This is never null, but the associated type might be.
llvm-svn: 105503
|
|
|
|
|
|
|
| |
the case where we pick up block arguments from a typedef. Save the block
signature as it was written, and preserve same through PCH.
llvm-svn: 105466
|
|
|
|
|
|
|
| |
Allows this check to work properly for instantiated fields and removes
an unnecessary GetTypeForDeclarator call.
llvm-svn: 105463
|
|
|
|
|
|
| |
exposes less details.
llvm-svn: 104797
|
|
|
|
| |
llvm-svn: 104795
|
|
|
|
| |
llvm-svn: 104739
|
|
|
|
| |
llvm-svn: 104733
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
that is missing the 'template' keyword, e.g.,
t->getAs<T>()
where getAs is a member of an unknown specialization. C++ requires
that we treat "getAs" as a value, but that would fail to parse since T
is the name of a type. We would then fail at the '>', since a type
cannot be followed by a '>'.
This is a very common error for C++ programmers to make, especially
since GCC occasionally allows it when it shouldn't (as does Visual
C++). So, when we are in this case, we use tentative parsing to see if
the tokens starting at "<" can only be parsed as a template argument
list. If so, we produce a diagnostic with a fix-it that states that
the 'template' keyword is needed:
test/SemaTemplate/dependent-template-recover.cpp:5:8: error: 'template' keyword
is required to treat 'getAs' as a dependent template name
t->getAs<T>();
^
template
This is just a start of this patch; I'd like to apply the same
approach to everywhere that a template-id with dependent template name
can be parsed.
llvm-svn: 104406
|
|
|
|
|
|
| |
Fixes <rdar://problem/7987650>.
llvm-svn: 104376
|
|
|
|
| |
llvm-svn: 104218
|
|
|
|
|
|
| |
<rdar://problem/7995494>.
llvm-svn: 104217
|
|
|
|
| |
llvm-svn: 104169
|
|
|
|
|
|
| |
object variables and functions returning such objects.
llvm-svn: 104168
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ObjCObjectType, which is basically just a pair of
one of {primitive-id, primitive-Class, user-defined @class}
with
a list of protocols.
An ObjCObjectPointerType is therefore just a pointer which always points to
one of these types (possibly sugared). ObjCInterfaceType is now just a kind
of ObjCObjectType which happens to not carry any protocols.
Alter a rather large number of use sites to use ObjCObjectType instead of
ObjCInterfaceType. Store an ObjCInterfaceType as a pointer on the decl rather
than hashing them in a FoldingSet. Remove some number of methods that are no
longer used, at least after this patch.
By simplifying ObjCObjectPointerType, we are now able to easily remove and apply
pointers to Objective-C types, which is crucial for a certain kind of ObjC++
metaprogramming common in WebKit.
llvm-svn: 103870
|
|
|
|
|
|
|
|
|
|
|
|
| |
return value optimization. Sema marks return statements with their
NRVO candidates (which may or may not end up using the NRVO), then, at
the end of a function body, computes and marks those variables that
can be allocated into the return slot.
I've checked this locally with some debugging statements (not
committed), but there won't be any tests until CodeGen comes along.
llvm-svn: 103865
|
|
|
|
|
|
| |
Radar 7923673.
llvm-svn: 103812
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"used" (e.g., we will refer to the vtable in the generated code) and
when they are defined (i.e., because we've seen the key function
definition). Previously, we were effectively tracking "potential
definitions" rather than uses, so we were a bit too eager about emitting
vtables for classes without key functions.
The new scheme:
- For every use of a vtable, Sema calls MarkVTableUsed() to indicate
the use. For example, this occurs when calling a virtual member
function of the class, defining a constructor of that class type,
dynamic_cast'ing from that type to a derived class, casting
to/through a virtual base class, etc.
- For every definition of a vtable, Sema calls MarkVTableUsed() to
indicate the definition. This happens at the end of the translation
unit for classes whose key function has been defined (so we can
delay computation of the key function; see PR6564), and will also
occur with explicit template instantiation definitions.
- For every vtable defined/used, we mark all of the virtual member
functions of that vtable as defined/used, unless we know that the key
function is in another translation unit. This instantiates virtual
member functions when needed.
- At the end of the translation unit, Sema tells CodeGen (via the
ASTConsumer) which vtables must be defined (CodeGen will define
them) and which may be used (for which CodeGen will define the
vtables lazily).
From a language perspective, both the old and the new schemes are
permissible: we're allowed to instantiate virtual member functions
whenever we want per the standard. However, all other C++ compilers
were more lazy than we were, and our eagerness was both a performance
issue (we instantiated too much) and a portability problem (we broke
Boost test cases, which now pass).
Notes:
(1) There's a ton of churn in the tests, because the order in which
vtables get emitted to IR has changed. I've tried to isolate some of
the larger tests from these issues.
(2) Some diagnostics related to
implicitly-instantiated/implicitly-defined virtual member functions
have moved to the point of first use/definition. It's better this
way.
(3) I could use a review of the places where we MarkVTableUsed, to
see if I missed any place where the language effectively requires a
vtable.
Fixes PR7114 and PR6564.
llvm-svn: 103718
|
|
|
|
| |
llvm-svn: 103517
|
|
|
|
|
|
|
|
|
| |
particular, don't complain about unused variables that have dependent
type until instantiation time, so that we can look at the type of the
variable. Moreover, only complain about unused variables that have
neither a user-declared constructor nor a non-trivial destructor.
llvm-svn: 103362
|
|
|
|
|
|
|
| |
an enum in the enum decl itself. Use some spare bits from TagDecl for this
purpose.
llvm-svn: 103173
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
typedef int functype(int, int);
functype func;
also instantiate the synthesized function parameters for the resulting
function declaration.
With this change, Boost.Wave builds and passes all of its regression
tests.
llvm-svn: 103025
|
|
|
|
|
|
|
|
| |
(-Wunused-exception-parameter) than normal variables, since it's more
common to name and then ignore an exception parameter. This warning is
neither enabled by default nor by -Wall. Fixes <rdar://problem/7931045>.
llvm-svn: 102931
|
|
|
|
|
|
| |
as non-empty. Fixes PR7021.
llvm-svn: 102913
|
|
|
|
|
|
|
| |
already knows what context it's looking in. Just pass that context in
instead of (questionably) recalculating it.
llvm-svn: 102818
|
|
|
|
|
|
|
|
|
| |
entering the current instantiation. Set up a little to preserve type location
information for typename types while we're in there.
Fixes a Boost failure.
llvm-svn: 102673
|
|
|
|
|
|
| |
braces is none.
llvm-svn: 102496
|
|
|
|
|
|
|
| |
tag of the same name, compare the lookup contexts rather than the
actual contexts. Fixes PR6923.
llvm-svn: 102437
|
|
|
|
|
|
| |
variables. Fixes PR6948.
llvm-svn: 102436
|
|
|
|
| |
llvm-svn: 102390
|
|
|
|
| |
llvm-svn: 102249
|
|
|
|
|
|
|
|
| |
when they are not complete (since we could not match them up to
anything) and ensuring that enum parsing can cope with dependent
elaborated-type-specifiers. Fixes PR6915 and PR6649.
llvm-svn: 102247
|
|
|
|
|
|
|
| |
(e.g., no typename, enum, class, etc.), e.g., because the context is
one that is known to refer to a type. Patch from Enea Zaffanella!
llvm-svn: 102243
|
|
|
|
|
|
|
| |
declaration" (i.e. the only which will actually be looked up) to have the
non-member-operator bit.
llvm-svn: 102231
|
|
|
|
|
|
| |
testsuite.
llvm-svn: 102224
|
|
|
|
|
|
|
|
|
| |
arguments. Rather than having the parser call ActOnParamDeclarator
(which is a bit of a hack), call a new ActOnObjCExceptionDecl
action. We'll be moving more functionality into this handler to
perform earlier checking of @catch.
llvm-svn: 102222
|
|
|
|
| |
llvm-svn: 102218
|
|
|
|
|
|
| |
a simple IDNS mask by introducing a namespace for non-member operators.
llvm-svn: 102215
|
|
|
|
|
|
| |
two bugfixes which fix selfhost and (hopefully) the nightly tests.
llvm-svn: 102198
|
|
|
|
|
|
| |
same", which seems to break most C++ nightly test apps.
llvm-svn: 102174
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
look for the const on the base type rather than on the top-level
type. Fixes PR6495 properly.
llvm-svn: 102066
|
|
|
|
|
|
| |
self-host :)
llvm-svn: 102050
|
|
|
|
|
|
| |
failure on bootstrap.
llvm-svn: 102043
|
|
|
|
| |
llvm-svn: 102040
|
|
|
|
| |
llvm-svn: 101962
|
|
|
|
|
|
|
|
| |
function declaration, since it may end up being changed (e.g.,
"extern" can become "static" if a prior declaration was static). Patch
by Enea Zaffanella and Paolo Bolzoni.
llvm-svn: 101826
|
|
|
|
|
|
| |
extern entity being initialized is const.
llvm-svn: 101821
|