| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
to an error, so that users can turn them off if necessary. Note that
this does *not* change the behavior of in a SFINAE context, where we
still flag an error even if the warning is disabled. This matches
GCC's behavior.
llvm-svn: 148701
|
|
|
|
|
|
|
|
|
|
| |
values and non-type template arguments of integral and enumeration types.
This change causes some legal C++98 code to no longer compile in C++11 mode, by
enforcing the C++11 rule that narrowing integral conversions are not permitted
in the final implicit conversion sequence for the above cases.
llvm-svn: 148439
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for it to be used in converted constant expression checking, and fix a couple
of issues:
- Conversion operators implicitly invoked prior to the narrowing conversion
were not being correctly handled when determining whether a constant value
was narrowed.
- For conversions from floating-point to integral types, the diagnostic text
incorrectly always claimed that the source expression was not a constant
expression.
llvm-svn: 148381
|
|
|
|
|
|
| |
This does not yet support CodeGen.
llvm-svn: 148349
|
|
|
|
| |
llvm-svn: 148296
|
|
|
|
|
|
| |
appropriate or when GCC requires it)
llvm-svn: 148292
|
|
|
|
|
|
| |
This allows -Wswitch-enum to find switches that need updating when these enums are modified.
llvm-svn: 148281
|
|
|
|
|
|
|
| |
And once again improve the typo correction results in certain
situations just by moving the existing checks on the correction.
llvm-svn: 148037
|
|
|
|
| |
llvm-svn: 147575
|
|
|
|
|
|
|
| |
'is an extension'. The former is inappropriate and confusing when building with
-Werror/-pedantic-errors.
llvm-svn: 147357
|
|
|
|
|
|
| |
to initialization sequence dumping.
llvm-svn: 147171
|
|
|
|
| |
llvm-svn: 147156
|
|
|
|
|
|
| |
overloading, initializer_list.
llvm-svn: 147145
|
|
|
|
| |
llvm-svn: 146961
|
|
|
|
|
|
| |
initialization that involves a ConstructorConversion
llvm-svn: 146766
|
|
|
|
|
|
|
|
|
|
| |
fails within a call to a constexpr function. Add -fconstexpr-backtrace-limit
argument to driver and frontend, to control the maximum number of notes so
produced (default 10). Fix APValue printing to be able to pretty-print all
APValue types, and move the testing for this functionality from a unittest to
a -verify test now that it's visible in clang's output.
llvm-svn: 146749
|
|
|
|
|
|
|
|
|
|
| |
for some cast expressions.
Original commit message:
Removed useless ImplicitCast nodes in explicit cstyle and static casts
llvm-svn: 145447
|
|
|
|
| |
llvm-svn: 145244
|
|
|
|
|
|
| |
This supports single-element initializer lists for references according to DR1288, as well as creating temporaries and binding to them for other initializer lists.
llvm-svn: 145186
|
|
|
|
|
|
|
|
|
|
| |
pointer mismatch. Cases covered are: initialization, assignment, and function
arguments. Additional text will give the extra information about the nature
of the mismatch: different classes for member functions, wrong number of
parameters, different parameter type, different return type, and function
qualifier mismatch.
llvm-svn: 145114
|
|
|
|
| |
llvm-svn: 144995
|
|
|
|
| |
llvm-svn: 144850
|
|
|
|
|
|
|
| |
'auto'. Introduce a convenience method to make this a bit
easier, and use it elsewhere.
llvm-svn: 144605
|
|
|
|
|
|
| |
literals of array type, materialise a temporary.
llvm-svn: 144483
|
|
|
|
|
|
|
|
| |
implicitly perform an lvalue-to-rvalue conversion if used on an lvalue
expression. Also improve the documentation of Expr::Evaluate* to indicate which
of them will accept expressions with side-effects.
llvm-svn: 143263
|
|
|
|
|
|
| |
GCC compiler workaround.
llvm-svn: 142931
|
|
|
|
|
|
| |
r142914: "Introduce a placeholder type for "pseudo object""
r142915: "Pull the pseudo-object stuff into its own file."
llvm-svn: 142921
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
expressions: expressions which refer to a logical rather
than a physical l-value, where the logical object is
actually accessed via custom getter/setter code.
A subsequent patch will generalize the AST for these
so that arbitrary "implementing" sub-expressions can
be provided.
Right now the only client is ObjC properties, but
this should be generalizable to similar language
features, e.g. Managed C++'s __property methods.
llvm-svn: 142914
|
|
|
|
| |
llvm-svn: 142695
|
|
|
|
|
|
| |
have an unambiguous accessible copying constructor; this is ill-formed in C++98.
llvm-svn: 142533
|
|
|
|
| |
llvm-svn: 142426
|
|
|
|
|
|
|
| |
passing/receiving CF objects at +0 to/from Objective-C methods
or audited C functions.
llvm-svn: 142219
|
|
|
|
|
|
| |
This also applies to C99-style aggregate literals, should they be used in C++11, since they are effectively identical to constructor call list-initialization syntax.
llvm-svn: 142147
|
|
|
|
|
|
| |
an init list can be value-initialized, at least when designated initializers are not involved. No test case yet, since early failures cannot be distinguished from late failures until overload resolution works.
llvm-svn: 142146
|
|
|
|
|
|
|
|
| |
of a pointer.
Passing a pointer was a bad idea as it collides with the overload for void*.
llvm-svn: 141971
|
|
|
|
|
|
|
|
|
|
|
| |
- Remodel Expr::EvaluateAsInt to behave like the other EvaluateAs* functions,
and add Expr::EvaluateKnownConstInt to capture the current fold-or-assert
behaviour.
- Factor out evaluation of bitfield bit widths.
- Fix a few places which would evaluate an expression twice: once to determine
whether it is a constant expression, then again to get the value.
llvm-svn: 141561
|
|
|
|
| |
llvm-svn: 141549
|
|
|
|
|
|
| |
Found by valgrind.
llvm-svn: 141510
|
|
|
|
| |
llvm-svn: 141171
|
|
|
|
|
|
|
|
| |
InitListChecker::getStructuredSubobjectInit which was increasing the reserved size for an init list past its maximum possible size. Fixes PR11056, a case where we were reserving a bunch of memory for arrays that was never actually used.
(No testcase because I don't think we have any way to actually write a testcase for this; the chosen value of NumElements has no effects on anything other than performance and memory usage.)
llvm-svn: 141106
|
|
|
|
| |
llvm-svn: 140642
|
|
|
|
|
|
| |
references.
llvm-svn: 140594
|
|
|
|
|
|
|
|
| |
mode, at least for the moment. <rdar://problem/10185490>.
Sebastian, please take a look at this; I'm not entirely sure it is the right thing to do.
llvm-svn: 140552
|
|
|
|
|
|
| |
difference at the moment, as far as I can tell.
llvm-svn: 140546
|
|
|
|
|
|
| |
Also make sure we set the error flag when correcting a typo.
llvm-svn: 140466
|
|
|
|
|
|
|
|
|
| |
Allow empty initializer lists for scalars, which mean value-initialization.
Constant evaluation for single-element and empty initializer lists for scalars.
Codegen for empty initializer lists for scalars.
Test case comes in next commit.
llvm-svn: 140459
|
|
|
|
|
|
|
|
|
|
|
| |
diagnostics nor
builds a semantic (structured) initializer list, just reports on whether it can match
the given list to the target type.
Use this mode for doing init list checking in the initial step of initialization, which
will eventually allow us to do overload resolution based on the outcome.
llvm-svn: 140457
|
|
|
|
|
|
|
| |
resolves to a constructor call in C++11) and failure kind
FK_ListInitializationFailed (early InitListChecker run failed).
llvm-svn: 140456
|
|
|
|
| |
llvm-svn: 140455
|
|
|
|
| |
llvm-svn: 140454
|