| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
template parameters of pointer, pointer-to-member, or nullptr_t
type in C++11. Fixes PR9700 / <rdar://problem/11193097>.
llvm-svn: 154219
|
| |
|
|
|
|
|
|
|
| |
the template instantiation of statement-expressions.
I think it was jyasskin who had a crashing testcase in this area;
hopefully this fixes it and he can find his testcase and check it in.
llvm-svn: 154189
|
| |
|
|
|
|
| |
conditionals. Patch by Tim Northover.
llvm-svn: 154134
|
| |
|
|
|
|
|
| |
statement-expressions. Prevents cleanups and such from being
claimed by the first full-expression in the block.
llvm-svn: 153989
|
| |
|
|
| |
llvm-svn: 153985
|
| |
|
|
|
|
| |
explicitly, deleted in all relevant cases, and explain why.
llvm-svn: 153894
|
| |
|
|
|
|
| |
member function is deleted.
llvm-svn: 153773
|
| |
|
|
|
|
| |
in ARC, under the usual reasoning limiting the use of __autoreleasing.
llvm-svn: 153725
|
| |
|
|
|
|
|
| |
provide 'fixit' hint when dictionary index
is not of proper type. // rdar://11062080
llvm-svn: 153584
|
| |
|
|
|
|
|
|
|
| |
the diagnostic for assigning to a copied block capture. This has
the pleasant side-effect of letting us special-case the diagnostic
for assigning to a copied lambda capture as well, without introducing
a new non-modifiable enumerator for it.
llvm-svn: 152593
|
| |
|
|
|
|
|
|
|
|
| |
(Lex to AST).
The member variable is always "LangOpts" and the member function is always "getLangOpts".
Reviewed by Chris Lattner
llvm-svn: 152536
|
| |
|
|
|
|
|
|
| |
track whether the referenced declaration comes from an enclosing
local context. I'm amenable to suggestions about the exact meaning
of this bit.
llvm-svn: 152491
|
| |
|
|
|
|
|
|
|
| |
- getSourceRange().getBegin() is about as awesome a pattern as .copy().size().
I already killed the hot paths so this doesn't seem to impact performance on my
tests-of-the-day, but it is a much more sensible (and shorter) pattern.
llvm-svn: 152419
|
| |
|
|
|
|
| |
and lots of tidying up.
llvm-svn: 152392
|
| |
|
|
|
|
|
| |
- This function is not at all free; pass it around along some hot paths instead
of recomputing it deep inside various VarDecl methods.
llvm-svn: 152363
|
| |
|
|
|
|
| |
introduces cleanups anyway.
llvm-svn: 152345
|
| |
|
|
|
|
|
| |
user-defined-floating-literal. Support for raw forms of these literals
to follow.
llvm-svn: 152302
|
| |
|
|
| |
llvm-svn: 152277
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
analysis to make the AST representation testable. They are represented by a
new UserDefinedLiteral AST node, which is a sugared CallExpr. All semantic
properties, including full CodeGen support, are achieved for free by this
representation.
UserDefinedLiterals can never be dependent, so no custom instantiation
behavior is required. They are mangled as if they were direct calls to the
underlying literal operator. This matches g++'s apparent behavior (but not its
actual mangling, which is broken for literal-operator-ids).
User-defined *string* literals are now fully-operational, but the semantic
analysis is quite hacky and needs more work. No other forms of user-defined
literal are created yet, but the AST support for them is present.
This patch committed after midnight because we had already hit the quota for
new kinds of literal yesterday.
llvm-svn: 152211
|
| |
|
|
|
|
| |
when debugging. // rdar://10997647
llvm-svn: 152187
|
| |
|
|
|
|
| |
this.
llvm-svn: 152158
|
| |
|
|
|
|
|
|
| |
blocks with unknown return types. This allows
LLDB to call blocks even when their return types
aren't provided in the debug information.
llvm-svn: 152147
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
NSNumber, and boolean literals. This includes both Sema and Codegen support.
Included is also support for new Objective-C container subscripting.
My apologies for the large patch. It was very difficult to break apart.
The patch introduces changes to the driver as well to cause clang to link
in additional runtime support when needed to support the new language features.
Docs are forthcoming to document the implementation and behavior of these features.
llvm-svn: 152137
|
| |
|
|
| |
llvm-svn: 152128
|
| |
|
|
|
|
| |
return types that return non-void values. // rdar://10735698
llvm-svn: 152047
|
| |
|
|
|
|
|
|
| |
It doesn't warn if the integer is known at compile time and within
the bounds of the string.
Discussion: http://comments.gmane.org/gmane.comp.compilers.clang.scm/47203
llvm-svn: 151943
|
| |
|
|
|
|
| |
// rdar://10961370
llvm-svn: 151923
|
| |
|
|
|
|
|
|
|
| |
early, since their values can be used in constant expressions in C++11. For
odr-use checking, the opposite change is required, since references are
odr-used whether or not they satisfy the requirements for appearing in a
constant expression.
llvm-svn: 151881
|
| |
|
|
|
|
|
|
|
| |
But it is in the underlying c part of clang. clang crashes
in IRGen when passing an incomplete type argument to
variadic function (instead of diagnosing the bug).
// rdar://10961370
llvm-svn: 151862
|
| |
|
|
| |
llvm-svn: 151837
|
| |
|
|
| |
llvm-svn: 151754
|
| |
|
|
|
|
| |
are sometimes potentially evaluated.
llvm-svn: 151707
|
| |
|
|
| |
llvm-svn: 151699
|
| |
|
|
|
|
| |
assignment of init lists to built-in types and resolves PR12088.
llvm-svn: 151551
|
| |
|
|
| |
llvm-svn: 151478
|
| |
|
|
| |
llvm-svn: 151447
|
| |
|
|
|
|
| |
type and void* is used. <rdar://problem/10486347>.
llvm-svn: 151416
|
| |
|
|
|
|
|
|
|
|
|
| |
explicit conversion functions to initialize the argument to a
copy/move constructor that itself is the subject of direct
initialization. Since we don't have that much context in overload
resolution, we end up threading more flags :(.
Fixes <rdar://problem/10903741> / PR10456.
llvm-svn: 151409
|
| |
|
|
|
|
| |
that we can correctly compute value-dependence of the OVE.
llvm-svn: 151291
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
function call (or a comma expression with a function call on its right-hand
side), possibly parenthesized, then the return type is not required to be
complete and a temporary is not bound. Other subexpressions inside a decltype
expression do not get this treatment.
This is implemented by deferring the relevant checks for all calls immediately
within a decltype expression, then, when the expression is fully-parsed,
checking the relevant constraints and stripping off any top-level temporary
binding.
Deferring the completion of the return type exposed a bug in overload
resolution where completion of the argument types was not attempted, which
is also fixed by this change.
llvm-svn: 151117
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
arguments. There are two aspects to this:
- Make sure that when marking the declarations referenced in a
default argument, we don't try to mark local variables, both because
it's a waste of time and because the semantics are wrong: we're not
in a place where we could capture these variables again even if it
did make sense.
- When a lambda expression occurs in a default argument of a
function template, make sure that the corresponding closure type is
considered dependent, so that it will get properly instantiated. The
second bit is a bit of a hack; to fix it properly, we may have to
rearchitect our handling of default arguments, parsing them only
after creating the function definition. However, I'd like to
separate that work from the lambdas work.
llvm-svn: 151076
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
default arguments of function parameters. This simple-sounding task is
complicated greatly by two issues:
(1) Default arguments aren't actually a real context, so we need to
maintain extra state within lambda expressions to track when a
lambda was actually in a default argument.
(2) At the time that we parse a default argument, the FunctionDecl
doesn't exist yet, so lambda closure types end up in the enclosing
context. It's not clear that we ever want to change that, so instead
we introduce the notion of the "effective" context of a declaration
for the purposes of name mangling.
llvm-svn: 151011
|
| |
|
|
|
|
| |
rather than an lvalue referring to the scalar.
llvm-svn: 150889
|
| |
|
|
| |
llvm-svn: 150877
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
eliminating a bunch of redundant code and properly modeling how the
captures of outside blocks/lambdas affect the types seen by inner
captures.
This new scheme makes two passes over the capturing scope stack. The
first pass goes up the stack (from innermost to outermost), assessing
whether the capture looks feasible and stopping when it either hits
the scope where the variable is declared or when it finds an existing
capture. The second pass then walks down the stack (from outermost to
innermost), capturing the variable at each step and updating the
captured type and the type that an expression referring to that
captured variable would see. It also checks type-specific
restrictions, such as the inability to capture an array within a
block. Note that only the first odr-use of each
variable needs to do the full walk; subsequent uses will find the
capture immediately, so multiple walks need not occur.
The same routine that builds the captures can also compute the type of
the captures without signaling errors and without actually performing
the capture. This functionality is used to determine the type of
declaration references as well as implementing the weird decltype((x))
rule within lambda expressions.
The capture code now explicitly takes sides in the debate over C++
core issue 1249, which concerns the type of captures within nested
lambdas. We opt to use the more permissive, more useful definition
implemented by GCC rather than the one implemented by EDG.
llvm-svn: 150875
|
| |
|
|
|
|
|
| |
variable; it was previously duplicated, and one of the copies failed
to account for outer non-mutable lambda captures.
llvm-svn: 150872
|
| |
|
|
|
|
| |
we're capturing it by value in a non-mutable lambda.
llvm-svn: 150791
|
| |
|
|
|
|
|
|
|
| |
even if they are not within a function scope. Teach template
instantiation to treat them as such, and make sure that we have a
local instantiation scope when instantiating default arguments and
static data members.
llvm-svn: 150725
|
| |
|
|
|
|
|
|
| |
hold the used constructor itself.""
This reintroduces commit r150682 with a fix for the Bullet benchmark crash.
llvm-svn: 150685
|
| |
|
|
|
|
|
|
|
|
| |
used constructor itself."
It leads to a compiler crash in the Bullet benchmark.
This reverts commit r12014.
llvm-svn: 150684
|