| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
function within a class hierarchy (C++ [class.virtual]p2).
We use the final-overrider computation to determine when a particular
class is ill-formed because it has multiple final overriders for a
given virtual function (e.g., because two virtual functions override
the same virtual function in the same virtual base class). Fixes
PR5973.
We also use the final-overrider computation to determine which virtual
member functions are pure when determining whether a class is
abstract or diagnosing the improper use of an abstract class. The
prior approach to determining whether there were any pure virtual
functions in a class didn't cope with virtual base class subobjects
properly, and could not easily be fixed to deal with the oddities of
subobject hiding. Fixes PR6631.
llvm-svn: 99351
|
| |
|
|
|
|
| |
we see an specialization definition ever if we then see a extern template declaration.
llvm-svn: 99226
|
| |
|
|
| |
llvm-svn: 99188
|
| |
|
|
|
|
|
|
|
| |
TSK_ExplicitInstantiationDeclaration make sure we call
MaybeMarkVirtualMembersReferenced with a method attached to the definition.
Remove the hack that forced vtable emition with declarations.
llvm-svn: 99174
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
entity (if applicable) which was actually looked up. If a candidate was found
via a using declaration, this is the UsingShadowDecl; otherwise, if
the candidate is template specialization, this is the template; otherwise,
this is the function.
The point of this exercise is that "found declarations" are the entities
we do access control for, not their underlying declarations. Broadly speaking,
this patch fixes access control for using declarations.
There is a *lot* of redundant code calling into the overload-resolution APIs;
we really ought to clean that up.
llvm-svn: 98945
|
| |
|
|
|
|
| |
that occur in constructors (on the unwind path).
llvm-svn: 98681
|
| |
|
|
|
|
| |
constructors from implicitly-defined members.
llvm-svn: 98614
|
| |
|
|
|
|
| |
destructor definitions. Remove some code duplication.
llvm-svn: 98611
|
| |
|
|
|
|
| |
required when emitting a destructor definition.
llvm-svn: 98609
|
| |
|
|
|
|
| |
destructors.
llvm-svn: 98440
|
| |
|
|
|
|
|
|
| |
whether it inherited one from a previous declaration.
Patch by Enea Zaffanella!
llvm-svn: 98362
|
| |
|
|
|
|
|
|
|
|
|
| |
instantiation. Based on a patch by Enea Zaffanella! I found a way to
reduce some of the redundancy between TreeTransform's "standard"
FunctionProtoType transformation and TemplateInstantiator's override,
and I killed off the old SubstFunctionType by adding type source info
for the last cases where we were creating FunctionDecls without TSI
(at least that get passed through template instantiation).
llvm-svn: 98252
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
injected class name of a class template or class template partial specialization.
This is a non-canonical type; the canonical type is still a template
specialization type. This becomes the TypeForDecl of the pattern declaration,
which cleans up some amount of code (and complicates some other parts, but
whatever).
Fixes PR6326 and probably a few others, primarily by re-establishing a few
invariants about TypeLoc sizes.
llvm-svn: 98134
|
| |
|
|
|
|
| |
This fixes PR6474.
llvm-svn: 98123
|
| |
|
|
|
|
|
|
|
| |
incomplete type to warnings; GCC (and EDG in GCC compatibility mode)
permit such handles. Fixes PR6527.
(For real this time)
llvm-svn: 97927
|
| |
|
|
|
|
| |
types. Fixes PR6463.
llvm-svn: 97924
|
| |
|
|
|
|
|
| |
that is not reference-related (because it requires another implicit
conversion to which we can find). Fixes PR6483.
llvm-svn: 97922
|
| |
|
|
|
|
| |
caught can be copy-initialized and destructed. Fixes PR6518.
llvm-svn: 97853
|
| |
|
|
|
|
|
|
| |
we need to synthesize has been marked as used by Sema.
Change Sema to avoid these asserts.
llvm-svn: 97589
|
| |
|
|
| |
llvm-svn: 97291
|
| |
|
|
|
|
| |
ill-formed. Fixes PR6421
llvm-svn: 97152
|
| |
|
|
|
|
|
| |
When diagnosing bad conversions, skip the conversion for ignored object
arguments. Fixes PR 6398.
llvm-svn: 97090
|
| |
|
|
|
|
|
|
| |
fixing up a few callers that thought they were propagating NoReturn
information but were in fact saying something about exception
specifications.
llvm-svn: 96766
|
| |
|
|
| |
llvm-svn: 96335
|
| |
|
|
|
|
| |
they are re-checked on instantiation.
llvm-svn: 96217
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
headers, where malloc (and many other libc functions) are declared
with empty throw specifications, e.g.,
extern void *malloc (__SIZE_TYPE__ __size) throw () __attribute__
((__malloc__)) ;
The C++ standard doesn't seem to allow this, and redeclaring malloc as
the standard permits (as follows) resulted in Clang (rightfully!)
complaining about mis-matched exception specifications.
void *malloc(size_t size);
We work around this by silently propagating an empty throw
specification "throw()" from a function with C linkage declared in a
system header to a redeclaration that has no throw specifier.
Ick.
llvm-svn: 95969
|
| |
|
|
|
|
|
|
| |
variable type, we can (and should) still check for completeness of the
variable's type. Do so, to work around an assertion that shows up in
Boost's shared_ptr.
llvm-svn: 95934
|
| |
|
|
| |
llvm-svn: 95843
|
| |
|
|
|
|
| |
Decl subclasses. No functionality change.
llvm-svn: 95841
|
| |
|
|
|
|
|
| |
and CXXRecordDecl::getDefinition(); it's totally unnecessary. No
functionality change.
llvm-svn: 95836
|
| |
|
|
|
|
|
| |
conversions. Fix an access-control bug where privileges were not considered
at intermediate points along the inheritance path. Prepare for friends.
llvm-svn: 95775
|
| |
|
|
|
|
|
| |
may be some other places that could take advantage of this new information,
but I haven't really looked yet.
llvm-svn: 95600
|
| |
|
|
| |
llvm-svn: 95510
|
| |
|
|
|
|
| |
is a constructor for that class, right? Fixes PR6238.
llvm-svn: 95367
|
| |
|
|
|
|
|
|
| |
of a C++ record. Exposed a lot of problems where various routines were
silently doing The Wrong Thing (or The Acceptable Thing in The Wrong Order)
when presented with a non-definition. Also cuts down on memory usage.
llvm-svn: 95330
|
| |
|
|
| |
llvm-svn: 95079
|
| |
|
|
|
|
| |
magnitude clearer.
llvm-svn: 95078
|
| |
|
|
|
|
| |
definition. With that in mind, rename getDefinition to getAnyInitializer (to distinguish it from getInit) and reimplement it in terms of isThisDeclarationADefinition. Update all code to use this new function.
llvm-svn: 94999
|
| |
|
|
|
|
|
| |
not quite sure what we want to do about the AST representation; comments
welcome.
llvm-svn: 94967
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(necessarily simultaneous) changes:
- CXXBaseOrMemberInitializer now contains only a single initializer
rather than a set of initialiation arguments + a constructor. The
single initializer covers all aspects of initialization, including
constructor calls as necessary but also cleanup of temporaries
created by the initializer (which we never handled
before!).
- Rework + simplify code generation for CXXBaseOrMemberInitializers,
since we can now just emit the initializer as an initializer.
- Switched base and member initialization over to the new
initialization code (InitializationSequence), so that it
- Improved diagnostics for the new initialization code when
initializing bases and members, to match the diagnostics produced
by the previous (special-purpose) code.
- Simplify the representation of type-checked constructor initializers in
templates; instead of keeping the fully-type-checked AST, which is
rather hard to undo at template instantiation time, throw away the
type-checked AST and store the raw expressions in the AST. This
simplifies instantiation, but loses a little but of information in
the AST.
- When type-checking implicit base or member initializers within a
dependent context, don't add the generated initializers into the
AST, because they'll look like they were explicit.
- Record in CXXConstructExpr when the constructor call is to
initialize a base class, so that CodeGen does not have to infer it
from context. This ensures that we call the right kind of
constructor.
There are also a few "opportunity" fixes here that were needed to not
regress, for example:
- Diagnose default-initialization of a const-qualified class that
does not have a user-declared default constructor. We had this
diagnostic specifically for bases and members, but missed it for
variables. That's fixed now.
- When defining the implicit constructors, destructor, and
copy-assignment operator, set the CurContext to that constructor
when we're defining the body.
llvm-svn: 94952
|
| |
|
|
|
|
|
| |
previously, we were allowing this to bind to a temporary. Now, we
don't; add test-cases and improve diagnostics.
llvm-svn: 94831
|
| |
|
|
|
|
| |
to get the access bits set properly in conversion sets.
llvm-svn: 94744
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
sequences, where we would occasionally determine (incorrectly) that
one standard conversion sequence was a proper subset of another when,
in fact, they contained completely incomparable conversions.
This change records the types in each step within a standard
conversion sequence, so that we can check the specific comparison
types to determine when one sequence is a proper subset of the
other. Fixes this testcase (thanks, Anders!), which was distilled from
PR6095 (also thanks to Anders).
llvm-svn: 94660
|
| |
|
|
| |
llvm-svn: 94485
|
| |
|
|
|
|
| |
trying to override a function returning an lvalue reference with a function overriding an rvalue reference.
llvm-svn: 94183
|
| |
|
|
|
|
|
|
|
| |
when checking for covariance. Added some fun test cases, fixes PR6110.
This felt obvious enough to just commit. ;] Let me know if anything needs
tweaking.
llvm-svn: 94173
|
| |
|
|
|
|
|
| |
Change LookupResult to use UnresolvedSet. Also extract UnresolvedSet into its
own header and make it templated over an inline capacity.
llvm-svn: 93959
|
| |
|
|
|
|
|
|
|
| |
identifier always names a type. In the case of a dependent
nested-name-specifier, build a TypenameType to describe the dependent
base type. I'd like to move more of this behavior up into the parser,
but this fixes PR6062.
llvm-svn: 93871
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
that name constructors, the endless joys of out-of-line constructor
definitions, and various other corner cases that the previous hack
never imagined. Fixes PR5688 and tightens up semantic analysis for
constructor names.
Additionally, fixed a problem where we wouldn't properly enter the
declarator scope of a parenthesized declarator. We were entering the
scope, then leaving it when we saw the ")"; now, we re-enter the
declarator scope before parsing the parameter list.
Note that we are forced to perform some tentative parsing within a
class (call it C) to tell the difference between
C(int); // constructor
and
C (f)(int); // member function
which is rather unfortunate. And, although it isn't necessary for
correctness, we use the same tentative-parsing mechanism for
out-of-line constructors to improve diagnostics in icky cases like:
C::C C::f(int); // error: C::C refers to the constructor name, but
// we complain nicely and recover by treating it as
// a type.
llvm-svn: 93322
|
| |
|
|
|
|
|
| |
information to feed diagnostics instead of regenerating it. Much room for
improvement here, but fixes some unfortunate problems reporting on method calls.
llvm-svn: 93316
|