| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
| |
type. Localize all of the logic within a single function rather than spreading
it throughout the class.
Also fixes a buglet where we failed to check for a RHS arithmetic type wider
than the LHS and return its canonical type. I've yet to produce a test case
that breaks because of this, but it was spotted by inspection by folks on the
IRC channel and is obviously correct now.
llvm-svn: 121633
|
|
|
|
| |
llvm-svn: 121632
|
|
|
|
|
|
|
|
|
|
|
| |
user-defined operator overloads on the same enumeral types to the one place
where it is used.
In theory this removes wasted computation from several paths through this code,
but I'm not aware of a case where it actually matters. This is mostly for
cleanliness.
llvm-svn: 121630
|
|
|
|
|
|
|
| |
others have another ordering they would prefer, I'm all ears, but this one made
it much easier for me to find the group of operators I'm interested in.
llvm-svn: 121629
|
|
|
|
|
|
| |
added for binary operator&.
llvm-svn: 121628
|
|
|
|
| |
llvm-svn: 121627
|
|
|
|
|
|
| |
from the switch statement.
llvm-svn: 121626
|
|
|
|
|
|
| |
for a few cases.
llvm-svn: 121625
|
|
|
|
| |
llvm-svn: 121624
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
candidate set. This breaks apart a huge switch + goto system into distinct
methods on a class. It also places the current mess of tables and other static
state used in the process within that class.
This is still a work in progress. I did a few simplifications that jumped out
at me as I went, but I plan to iterate on this a bit before it's truly clean.
However, this is easily the most invasive chunk. I benchmarked it on
all-std-headers.cpp and an internal testcase that has a major hotspot in
overload resolution and saw no real performance impact.
llvm-svn: 121623
|
|
|
|
|
|
|
|
|
|
| |
space better. Remove this reference. To make that work, change some APIs
(most importantly, getDesugaredType()) to take an ASTContext& if they
need to return a QualType. Simultaneously, diminish the need to return a
QualType by introducing some useful APIs on SplitQualType, which is
just a std::pair<const Type *, Qualifiers>.
llvm-svn: 121478
|
|
|
|
|
|
|
|
| |
cv-qualification conversions. More specifically, there's an implicit
cv-qualification conversion (even one that drops qualifiers) when
converting to 'id' or qualified 'id'. Fixes <rdar://problem/8734046>.
llvm-svn: 121047
|
|
|
|
|
|
|
| |
be required, and then fix up some missing loads on overloaded-operator
paths which that exposed.
llvm-svn: 120896
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
conversions. Previously, we would end up collapsing qualification
conversions into the Objective-C pointer conversion step, including
(possibly) stripping qualifiers that shouldn't be removed.
This generalizes BuildSimilarlyQualifiedPointerType() to also work on
Objective-C object pointers, then eliminates the (redundant, not
totally correct) BuildSimilarlyQualifiedObjCObjectPointerType()
function.
Fixes <rdar://problem/8714395>.
llvm-svn: 120607
|
|
|
|
| |
llvm-svn: 120084
|
|
|
|
| |
llvm-svn: 119886
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
store it on the expression node. Also store an "object kind",
which distinguishes ordinary "addressed" l-values (like
variable references and pointer dereferences) and bitfield,
@property, and vector-component l-values.
Currently we're not using these for much, but I aim to switch
pretty much everything calculating l-valueness over to them.
For now they shouldn't necessarily be trusted.
llvm-svn: 119685
|
|
|
|
|
|
| |
rdar://7743000
llvm-svn: 119336
|
|
|
|
| |
llvm-svn: 119138
|
|
|
|
|
|
| |
binary operator, provide the types.
llvm-svn: 119008
|
|
|
|
|
|
|
|
|
|
| |
(while computing user conversion sequences), make sure that a result
of class type is a complete class type. Had we gone through
ActOnCallExpr, this would have happened when we built the CallExpr.
Fixes PR8425.
llvm-svn: 119005
|
|
|
|
|
|
|
|
|
|
| |
promoted arithmetic types for which builtin operator candidates are
emitted. A few of these need further analysis.
Removes all the uses of UsualArithmeticConversionsType except the
core function in SemaExpr.cpp.
llvm-svn: 118988
|
|
|
|
|
|
|
| |
instead of copying them all out at the start. Not a significant
optimization.
llvm-svn: 118967
|
|
|
|
|
|
| |
Fixes PR7915.
llvm-svn: 118670
|
|
|
|
|
|
|
|
|
| |
constructor template will not be used to copy a class object to a
value of its own type. We were eliminating all constructor templates
whose specializations look like a copy constructor, which eliminated
important candidates. Fixes PR8182.
llvm-svn: 118418
|
|
|
|
|
|
| |
Faisal Vali, tweaked by me. Fixes PR8230.
llvm-svn: 118400
|
|
|
|
|
|
| |
std::nullptr_t to bool is better than one than does.
llvm-svn: 118269
|
|
|
|
| |
llvm-svn: 118238
|
|
|
|
|
|
|
|
|
| |
the sets of available conversions for the first and second arguments
separate. This is apparently the indent of C++ [over.built], and
reduces the number of overload candidates generated, eliminating some
ambiguities. Fixes PR8477.
llvm-svn: 118178
|
|
|
|
|
|
| |
anymore.
llvm-svn: 117357
|
|
|
|
|
|
| |
conversion to id over conversion to void*.
llvm-svn: 117355
|
|
|
|
|
|
|
|
|
|
| |
the same rank as conversions of normal pointers to 'void*'.
Also, resurrect a test case.
Fixes rdar://problem/8592139
llvm-svn: 117354
|
|
|
|
|
|
|
| |
char32_t character types and enable built-in overloaded operator
candidates for these types. Fixes PR8432.
llvm-svn: 117038
|
|
|
|
|
|
| |
types, from Alp Toker! Fixes PR8344.
llvm-svn: 116549
|
|
|
|
|
|
|
| |
actually walk the template argument type to find any unnamed/local
types within it. Fixes PR6784.
llvm-svn: 116382
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
that are suppressed during template argument deduction. This change
queues diagnostics computed during template argument deduction. Then,
if the resulting function template specialization or partial
specialization is chosen by overload resolution or partial ordering
(respectively), we will emit the queued diagnostics at that point.
This addresses most of PR6784. However, the check for unnamed/local
template arguments (which existed before this change) is still only
skin-deep, and needs to be extended to look deeper into types. It must
be improved to finish PR6784.
llvm-svn: 116373
|
|
|
|
|
|
| |
bit by me).
llvm-svn: 116122
|
|
|
|
|
|
|
|
| |
against a function type, be sure to check the type of the resulting
function template specialization against the desired function type
after substituting the deduced/defaulted template arguments. Fixes PR8196.
llvm-svn: 115086
|
|
|
|
|
|
|
|
| |
"(void *)false".
Fixes rdar://8459342.
llvm-svn: 114955
|
|
|
|
|
|
|
|
| |
already be determined by isCopyAssignmentOperator(), and was set too
late in the process for all clients to see the appropriate
value. Cleanup only; no functionality change.
llvm-svn: 114916
|
|
|
|
|
|
| |
vla. Implements pr7827.
llvm-svn: 114737
|
|
|
|
|
|
|
| |
function fails due to ambiguities in partial ordering of function
templates. Fixes PR8033.
llvm-svn: 113725
|
|
|
|
|
|
|
| |
sequences for two conversion functions when in fact we are in the text
of initialization by a user-defined conversion sequences. Fixes PR8034.
llvm-svn: 113724
|
|
|
|
|
|
|
|
| |
be a semantic requirement that a built-in overloaded operator is not
added to the overload set of there is already a user-defined
overloaded operator with the same parameter types. Fixes PR8087.
llvm-svn: 113713
|
|
|
|
|
|
| |
type. Fixes PR8089 in a slightly different way than had been suggested.
llvm-svn: 113711
|
|
|
|
|
|
|
|
| |
with comma-separated lists. We never actually used the comma
locations, nor did we store them in the AST, but we did manage to
waste time during template instantiation to produce fake locations.
llvm-svn: 113495
|
|
|
|
|
|
|
|
|
|
|
| |
For large floats/integers, APFloat/APInt will allocate memory from the heap to represent these numbers.
Unfortunately, when we use a BumpPtrAllocator to allocate IntegerLiteral/FloatingLiteral nodes the memory associated with
the APFloat/APInt values will never get freed.
I introduce the class 'APNumericStorage' which uses ASTContext's allocator for memory allocation and is used internally by FloatingLiteral/IntegerLiteral.
Fixes rdar://7637185
llvm-svn: 112361
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
an '&' expression from the second caller of ActOnIdExpression.
Teach template argument deduction that an overloaded id-expression
doesn't give a valid type for deduction purposes to a non-static
member function unless the expression has the correct syntactic
form.
Teach ActOnIdExpression that it shouldn't try to create implicit
member expressions for '&function', because this isn't a
permitted form of use for member functions.
Teach CheckAddressOfOperand to diagnose these more carefully.
Some of these cases aren't reachable right now because earlier
diagnostics interrupt them.
llvm-svn: 112258
|
|
|
|
|
|
|
|
|
| |
One who seeks the Tao unlearns something new every day.
Less and less remains until you arrive at non-action.
When you arrive at non-action,
nothing will be left undone.
llvm-svn: 112244
|
|
|
|
|
|
|
| |
Clients of Sema don't need to know (for example) the list of diagnostics we
support.
llvm-svn: 112093
|