| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
at it.
llvm-svn: 86243
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* If the unsigned type is smaller than the signed type, never warn, because
its value will not change when zero-extended to the larger type.
* If we're testing for (in)equality, and the unsigned value is an integer
constant whose sign bit is not set, never warn, because even though the
signed value might change, it can't affect the result of the equality.
Also make the comparison test cases much more rigorous, and have them expose
the subtle differences between C and C++ here.
llvm-svn: 86242
|
| |
|
|
|
|
|
|
|
|
|
| |
get_origin->x
where get_origin is actually a function and the user has forgotten the
parentheses. Instead of giving a lame note for the fix-it, give a
full-fledge error, early, then build the call expression to try to
recover.
llvm-svn: 86238
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
implicit conversion sequence, check the validity of this conversion
and then perform it.
llvm-svn: 86210
|
| |
|
|
| |
llvm-svn: 86209
|
| |
|
|
|
|
|
| |
It has to do with vararg constructors used as conversion
functions. Code gen needs work. This is WIP.
llvm-svn: 86207
|
| |
|
|
|
|
| |
type-dependent initializers.
llvm-svn: 86197
|
| |
|
|
|
|
| |
and should especially not try to evaluate them.
llvm-svn: 86173
|
| |
|
|
|
|
| |
enum/class/struct/union specifier; in invalid code, we may also see ClassTemplateDecls.
llvm-svn: 86171
|
| |
|
|
|
|
| |
C++. Fixed PR5401
llvm-svn: 86165
|
| |
|
|
|
|
|
| |
always zero in this context" warning logic. Also, make the diagnostic
itself more precise when referring to pointer values ("NULL" vs. "zero").
llvm-svn: 86143
|
| |
|
|
|
|
| |
pointers. Otherwise, subscripting an array leads to no candidates at all. Fixes PR5360.
llvm-svn: 86140
|
| |
|
|
|
|
| |
This fixes PR5048. Also fix a bug where zero-sized arrays weren't warned about when the size was unsigned.
llvm-svn: 86136
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(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
|
| |
|
|
|
|
|
|
|
|
|
|
| |
DiagnoseSignCompare into Sema::CheckSignCompare and call it from more places.
Add some enumerator tests. These seem to expose some oddities in the
types we're converting C++ enumerators to; in particular, they're converting
to unsigned before int, which seems to contradict 4.5 [conv.prom] p2.
Note to self: stop baiting Doug in my commit messages.
llvm-svn: 86128
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
still be dependent or invoke an overloaded operator. Previously, we
only supported builtin operators.
BinaryOperator/CompoundAssignOperator didn't have this issue because
we always built a CXXOperatorCallExpr node, even when name lookup
didn't find any functions to save until instantiation time. Now, that
code builds a BinaryOperator or CompoundAssignOperator rather than a
CXXOperatorCallExpr, to save some space.
llvm-svn: 86087
|
| |
|
|
|
|
|
|
| |
Conditional operands are next.
Fixes part of rdar://problem/7289584.
llvm-svn: 86083
|
| |
|
|
| |
llvm-svn: 86079
|
| |
|
|
|
|
| |
explicitly-specified template arguments, too!
llvm-svn: 86066
|
| |
|
|
| |
llvm-svn: 86065
|
| |
|
|
| |
llvm-svn: 86061
|
| |
|
|
|
|
|
|
|
| |
type of the object even when it is dependent. Specifically, this makes
sure that we get the right type for "this->", which is important when
performing name lookup into this scope to determine whether an
identifier or operator-function-id is a template name.
llvm-svn: 86060
|
| |
|
|
|
|
| |
Fixes PR5349.
llvm-svn: 86052
|
| |
|
|
|
|
|
|
| |
types. Fixes PR5352.
Fariborz, please review.
llvm-svn: 86031
|
| |
|
|
|
|
| |
from Peter Collingbourne!
llvm-svn: 86030
|
| |
|
|
| |
llvm-svn: 86027
|
| |
|
|
|
|
| |
through to indexing.
llvm-svn: 86018
|
| |
|
|
|
|
|
|
|
| |
expressions, keep track of whether we are immediately taking the
address of the expression. Pass this flag when building a declaration
name expression so that we handle pointer-to-member constants
properly.
llvm-svn: 86017
|
| |
|
|
|
|
| |
varargs prototypes.
llvm-svn: 86001
|
| |
|
|
|
|
| |
rdar://problem/7222956
llvm-svn: 85999
|
| |
|
|
|
|
|
|
|
|
|
|
| |
appears in a deprecated context. In the new strategy, we emit the warnings
as usual unless we're currently parsing a declaration, where "declaration" is
restricted to mean a decl group or a few special cases in Objective C. If
we *are* parsing a declaration, we queue up the deprecation warnings until
the declaration has been completely parsed, and then emit them only if the
decl is not deprecated.
We also standardize the bookkeeping for deprecation so as to avoid special cases.
llvm-svn: 85998
|
| |
|
|
|
|
|
|
| |
overloaded operators, e.g.,
p->template operator+<T>()
llvm-svn: 85989
|
| |
|
|
|
|
|
| |
type to look at the volatile specifier. I found these all from just
hand auditing the code.
llvm-svn: 85967
|
| |
|
|
|
|
|
|
|
|
|
|
| |
operators, e.g.,
operator+<int>
which now works in declarators, id-expressions, and member access
expressions. This commit only implements the non-dependent case, where
we can resolve the template-id to an actual declaration.
llvm-svn: 85966
|
| |
|
|
|
|
|
| |
one instance of a large problem. assert for non-canoical types would
help track down these things.
llvm-svn: 85956
|
| |
|
|
|
|
| |
of value-initialization and trivial constructors.
llvm-svn: 85935
|
| |
|
|
|
|
|
|
|
|
|
|
| |
"->" with a use of ParseUnqualifiedId. Collapse
ActOnMemberReferenceExpr, ActOnDestructorReferenceExpr (both of them),
ActOnOverloadedOperatorReferenceExpr,
ActOnConversionOperatorReferenceExpr, and
ActOnMemberTemplateIdReferenceExpr into a single, new action
ActOnMemberAccessExpr that does the same thing more cleanly (and can
keep more source-location information).
llvm-svn: 85930
|
| |
|
|
|
|
|
|
|
|
|
| |
yet another copy of the unqualified-id parsing code.
Also, use UnqualifiedId to simplify the Action interface for building
id-expressions. ActOnIdentifierExpr, ActOnCXXOperatorFunctionIdExpr,
ActOnCXXConversionFunctionExpr, and ActOnTemplateIdExpr have all been
removed in favor of the new ActOnIdExpression action.
llvm-svn: 85904
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
representation of a C++ unqualified-id, along with a single parsing
function (Parser::ParseUnqualifiedId) that will parse all of the
various forms of unqualified-id in C++.
Replace the representation of the declarator name in Declarator with
the new UnqualifiedId class, simplifying declarator-id parsing
considerably and providing more source-location information to
Sema. In the future, I hope to migrate all of the other
unqualified-id-parsing code over to this single representation, then
begin to merge actions that are currently only different because we
didn't have a unqualified notion of the name in the parser.
llvm-svn: 85851
|
| |
|
|
|
|
|
| |
class must match those of same property declared
in its primary class. (Fixes radar 7352425)
llvm-svn: 85843
|
| |
|
|
|
|
|
| |
change a readonly property declared in the class (and its inherited protocols)
to writable property. (Fixes radar 7350645).
llvm-svn: 85836
|
| |
|
|
|
|
| |
in its class implementation instead of crashing. Fixes radar 7350345.
llvm-svn: 85813
|
| |
|
|
|
|
|
|
|
| |
integral constant expression, make sure to find where the initializer
was provided---inside or outside the class definition---since that can
affect whether we have an integral constant expression (and, we need
to see the initializer itself).
llvm-svn: 85741
|
| |
|
|
|
|
|
|
|
| |
that is not known to be a base class at template definition time due
to some dependent base class. Treat qualified name lookup that refers
to a non-static data member or function as implicit class member
access when the "this" type would be dependent.
llvm-svn: 85718
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
parameters and template type parameters, which occurs when
substituting into the declarations of member templates inside class
templates. This eliminates errors about our inability to "reduce
non-type template parameter depth", fixing PR5311.
Also fixes a bug when instantiating a template type parameter
declaration in a member template, where we weren't properly reducing
the template parameter's depth.
LLVM's StringSwitch header now parses.
llvm-svn: 85669
|
| |
|
|
|
|
| |
match it up with a declaration in the outer scope.
llvm-svn: 85628
|
| |
|
|
| |
llvm-svn: 85612
|
| |
|
|
| |
llvm-svn: 85594
|
| |
|
|
| |
llvm-svn: 85576
|