| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
classes. Fixes PR5545.
llvm-svn: 89215
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sugared types. The basic problem is that our qualifier accessors
(getQualifiers, getCVRQualifiers, isConstQualified, etc.) only look at
the current QualType and not at any qualifiers that come from sugared
types, meaning that we won't see these qualifiers through, e.g.,
typedefs:
typedef const int CInt;
typedef CInt Self;
Self.isConstQualified() currently returns false!
Various bugs (e.g., PR5383) have cropped up all over the front end due
to such problems. I'm addressing this problem by splitting each
qualifier accessor into two versions:
- the "local" version only returns qualifiers on this particular
QualType instance
- the "normal" version that will eventually combine qualifiers from this
QualType instance with the qualifiers on the canonical type to
produce the full set of qualifiers.
This commit adds the local versions and switches a few callers from
the "normal" version (e.g., isConstQualified) over to the "local"
version (e.g., isLocalConstQualified) when that is the right thing to
do, e.g., because we're printing or serializing the qualifiers. Also,
switch a bunch of
Context.getCanonicalType(T1).getUnqualifiedType() == Context.getCanonicalType(T2).getQualifiedType()
expressions over to
Context.hasSameUnqualifiedType(T1, T2)
llvm-svn: 88969
|
| |
|
|
| |
llvm-svn: 88893
|
| |
|
|
|
|
|
|
|
|
| |
that we're dealing with canonical types like the documentation say
(yay, CanQualType). Alas, this is another instance where using
getQualifiers() on a non-canonical QualType got us in trouble.
Good news: with this fix, Clang can now parse all of its own headers!
llvm-svn: 88848
|
| |
|
|
|
|
|
|
|
| |
reference. CheckReferenceInit already inserts implicit casts to the necessary types. This fixes an assertion in CodeGen for some casts and brings a fix for PR5453 close, if I understand that bug correctly.
- Also, perform calculated implicit cast sequences if they're determined to work. This finally diagnoses static_cast to ambiguous or implicit bases and fixes two long-standing fixmes in the test case. For the C-style cast, this requires propagating the access check suppression pretty deep into other functions.
- Pass the expressions for TryStaticCast and TryStaticImplicitCast by reference. This should lead to a better AST being emitted for such casts, and also fixes a memory leak, because CheckReferenceInit and PerformImplicitConversion wrap the node passed to them. These wrappers were previously lost.
llvm-svn: 88809
|
| |
|
|
|
|
|
|
| |
cast) that is converting to a class type, enumerate its constructors
as in any other direct initialization. This ensures that we get the
proper conversion sequence.
llvm-svn: 88751
|
| |
|
|
| |
llvm-svn: 86996
|
| |
|
|
|
|
|
|
|
|
| |
class type, don't perform the array-to-pointer or function-to-pointer
conversions, because we may end up binding a reference to a function
or array.
With this change, FileCheck now passes -fsyntax-only!
llvm-svn: 86211
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(without complaining if it fails) to get proper semantics: reference
binding with a derived-to-base conversion and the enumeration of
constructors for user-defined conversions. There are probably more
cases to fix, but my prior attempt at statically ensuring that
complete-type checking always happens failed. Perhaps I'll try again.
With this change, Clang can parse include/llvm/*.h!
llvm-svn: 86129
|
| |
|
|
|
|
| |
codegen).
llvm-svn: 85552
|
| |
|
|
|
|
| |
Fixes PR5261.
llvm-svn: 84860
|
| |
|
|
|
|
| |
Fixes PR5248.
llvm-svn: 84514
|
| |
|
|
| |
llvm-svn: 84438
|
| |
|
|
|
|
|
|
|
| |
for bases, members, overridden virtual methods, etc. The operations
isDerivedFrom and lookupInBases are now provided by CXXRecordDecl,
rather than by Sema, so that CodeGen and other clients can use them
directly.
llvm-svn: 83396
|
| |
|
|
|
|
| |
user-defined type conversion. Fixes PR5040.
llvm-svn: 83211
|
| |
|
|
| |
llvm-svn: 82826
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
a reference
llvm-svn: 82666
|
| |
|
|
| |
llvm-svn: 82072
|
| |
|
|
| |
llvm-svn: 81837
|
| |
|
|
|
|
| |
be called, generate implicit child expressions that call them.
llvm-svn: 81383
|
| |
|
|
| |
llvm-svn: 81346
|
| |
|
|
| |
llvm-svn: 81151
|
| |
|
|
|
|
| |
Fixes PR4827.
llvm-svn: 80720
|
| |
|
|
| |
llvm-svn: 80374
|
| |
|
|
| |
llvm-svn: 80368
|
| |
|
|
|
|
| |
with class type conversion methods. WIP.
llvm-svn: 80365
|
| |
|
|
| |
llvm-svn: 80260
|
| |
|
|
|
|
| |
the process.
llvm-svn: 80258
|
| |
|
|
| |
llvm-svn: 80182
|
| |
|
|
| |
llvm-svn: 80178
|
| |
|
|
|
|
| |
type convesions of class objects [class.conv]. WIP.
llvm-svn: 80127
|
| |
|
|
| |
llvm-svn: 79395
|
| |
|
|
| |
llvm-svn: 78415
|
| |
|
|
| |
llvm-svn: 77905
|
| |
|
|
|
|
| |
will be :)
llvm-svn: 77650
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
llvm-svn: 77451
|
| |
|
|
|
|
|
|
| |
regresses Clang extension conversions, like vectors, but allows conversions via constructors and conversion operators.
Add custom conversions to static_cast.
llvm-svn: 77076
|
|
|
llvm-svn: 76318
|