| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
Naming the destructor using a typedef-name for the class-name is
well-formed.
This fixes PR19620.
llvm-svn: 207892
|
| |
|
|
|
|
|
|
| |
apply the NRVO candidate flag to all possible NRVO candidates here, and remove the flags in computeNRVO or upon template instantiation. A variable now has NRVO applied if and only if every return statement in that scope returns that variable. This is nearly optimal.
Performs NRVO roughly 7% more often in a bootstrap build of clang. Patch co-authored by Richard Smith.
llvm-svn: 207890
|
| |
|
|
|
|
| |
range accessor in addition to the iterators. Updated code using iterators to use range-based for loops.
llvm-svn: 207837
|
| |
|
|
|
|
|
|
|
|
|
| |
class template member classes (PR19613)
Also improve this code in general by implementing suggestions
from Richard.
Differential Revision: http://reviews.llvm.org/D3555?id=9020
llvm-svn: 207822
|
| |
|
|
|
|
| |
Code review feedback from Reid Kleckner on r207806.
llvm-svn: 207811
|
| |
|
|
| |
llvm-svn: 207806
|
| |
|
|
|
|
|
|
| |
order by the number of missing or extra parameters. This is useful if
there are more than a few overload candidates with arity mismatches,
particularly in the presence of -fshow-overloads=best.
llvm-svn: 207796
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Previously, we would generate a single name for all reference
temporaries and allow LLVM to rename them for us. Instead, number the
reference temporaries as we build them in Sema.
Reviewers: rsmith
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D3554
llvm-svn: 207776
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
We accept 'void *p; p->~void();' for MSVC compatibility since r148682.
However, we were returning ExprError, rather than producing an AST,
despite only diagnosing it with a warning. CodeGen noticed that the
template function specialization had an invalid AST, and therefore
didn't generate code for it. This change makes us produce an AST with a
void pseudo-dtor call.
Part of PR18256.
llvm-svn: 207771
|
| |
|
|
|
|
|
|
| |
Reviewers: rsmith
Differential Revision: http://reviews.llvm.org/D3551
llvm-svn: 207734
|
| |
|
|
|
|
|
| |
correction to direct base class members, and recover properly after we apply
such a correction.
llvm-svn: 207731
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Summary: Friend declarations shouldn't mention explicit or virtual.
Reviewers: rsmith
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D3562
llvm-svn: 207682
|
| |
|
|
| |
llvm-svn: 207681
|
| |
|
|
|
|
| |
base classes.
llvm-svn: 207680
|
| |
|
|
|
|
| |
non-member declaration. Patch by Dinesh Dwivedi!
llvm-svn: 207677
|
| |
|
|
|
|
|
|
|
|
| |
We were emitting dynamic initializers for __thread variables if there
was no explicit initializer, as in this test case:
struct S { S(); };
__thread S s;
llvm-svn: 207675
|
| |
|
|
|
|
|
|
| |
Patch by Dinesh Dwivedi!
Differential Revision: http://reviews.llvm.org/D3376
llvm-svn: 207672
|
| |
|
|
|
|
|
|
|
| |
if-conditions.
I think this is the last commit for ARM64 big endian in clang. This commit makes
arm_neon.h compile correctly.
llvm-svn: 207624
|
| |
|
|
|
|
| |
// rdar://16737117
llvm-svn: 207542
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
A reference temporary should inherit the linkage of the variable it
initializes. Otherwise, we may hit cases where a reference temporary
wouldn't have the same value in all translation units.
Reviewers: rsmith
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D3515
llvm-svn: 207451
|
| |
|
|
|
|
|
|
|
|
|
| |
macro.
Libraries specify enabled/disabled features using macro defs of 0/1, in such cases the -Wconstant-logical-operand
is noise.
rdar://15410291
llvm-svn: 207386
|
| |
|
|
|
|
|
|
|
|
|
| |
we may have
switch CurContext due to class template instantiation.
Fixes crash of the included test case.
rdar://16527205
llvm-svn: 207325
|
| |
|
|
|
|
| |
partial specialization.
llvm-svn: 207260
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
after we've already instantiated a definition for the function, pass it to the
ASTConsumer again so that it knows the specialization kind has changed and can
update the function's linkage.
This only matters if we instantiate the definition of the function before we
reach the end of the TU; this can happen in at least three different ways:
C++11 constexpr functions, C++14 deduced return types, and functions
instantiated within modules.
llvm-svn: 207152
|
| |
|
|
|
|
|
|
| |
Also, use the enum type in the switch so this doesn't happen again.
PR19523
llvm-svn: 207128
|
| |
|
|
| |
llvm-svn: 207011
|
| |
|
|
|
|
| |
symbols in non-imported modules.
llvm-svn: 206977
|
| |
|
|
|
|
|
|
| |
statements, don't diagnose; the return type might end up being 'void'.
Patch by Rahul Jain! Tiny tweaks by me.
llvm-svn: 206929
|
| |
|
|
|
|
|
|
| |
on CF type is not sufficient and bridge casting is
still required for proper ownership semantics.
// rdar://16650445
llvm-svn: 206910
|
| |
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D3272
llvm-svn: 206891
|
| |
|
|
|
|
|
| |
objects to fund root class's instance methods.
// rdar://16650575
llvm-svn: 206781
|
| |
|
|
|
|
| |
imported from another module, emit an update record, rather than using the broken decl rewriting mechanism. If multiple modules do this, merge the definitions together, much as we would if they were separate declarations.
llvm-svn: 206680
|
| |
|
|
|
|
| |
const-correct. No functional changes intended.
llvm-svn: 206491
|
| |
|
|
| |
llvm-svn: 206452
|
| |
|
|
|
|
|
|
| |
definition.
clang\lib\Sema\SemaTemplate.cpp(1826) : error C2064: term does not evaluate to a function taking 1 arguments
llvm-svn: 206451
|
| |
|
|
|
|
|
| |
that looks like it might be an explicit specialization, don't recover as an
explicit specialization (bypassing the check that would reject that).
llvm-svn: 206444
|
| |
|
|
|
|
| |
template-id after its scope specifier into a single place.
llvm-svn: 206442
|
| |
|
|
|
|
|
| |
we'll already have issued the relevant diagnostic when we saw the declaration
of the primary template.
llvm-svn: 206441
|
| |
|
|
|
|
|
| |
when building the candidate set, rather than trying to contort name lookup into
handling this.
llvm-svn: 206436
|
| |
|
|
|
|
| |
non-member overloaded operators can be found when no operand is of class type. We used to fail to implement this rule if there was an operand of dependent type.
llvm-svn: 206435
|
| |
|
|
|
|
|
|
| |
subclasses do not call [super init] on their initializers.
Part of rdar://16568441
llvm-svn: 206410
|
| |
|
|
|
|
| |
No behavioural change intended.
llvm-svn: 206364
|
| |
|
|
|
|
|
|
| |
Warn on std::abs() with unsigned argument.
Suggest std::abs as replacement for the C absolute value functions.
Suggest C++ headers if the specific std::abs overload is not found.
llvm-svn: 206340
|
| |
|
|
| |
llvm-svn: 206298
|
| |
|
|
| |
llvm-svn: 206275
|
| |
|
|
| |
llvm-svn: 206273
|
| |
|
|
| |
llvm-svn: 206264
|
| |
|
|
|
|
| |
diagnostics which caused delayed diagnostics on dead paths to be emitted.
llvm-svn: 206232
|
| |
|
|
|
|
| |
if the member is already 'const'. Don't assert in that case.
llvm-svn: 206205
|
| |
|
|
|
|
|
|
|
|
| |
Parse of nested name spacifier is modified so that it properly recovers
if colon is mistyped as double colon in case statement.
This patch fixes PR15133.
Differential Revision: http://llvm-reviews.chandlerc.com/D2870
llvm-svn: 206135
|