| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
| |
conversion operators (the comparison could claim that two conversion operators are both better than each other). Actually implement DR495, rather than passing its test by chance because the declarations happened to be in the "lucky" order.
llvm-svn: 209054
|
| |
|
|
|
|
|
|
|
| |
The conventional form is '<action> to silence this warning'.
Also call the diagnostic an 'issue' rather than a 'message' because the latter
term is more widely used with reference to message expressions.
llvm-svn: 209052
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ensure that querying the first declaration for its most recent declaration
checks for redeclarations from the imported module.
This works as follows:
* The 'most recent' pointer on a canonical declaration grows a pointer to the
external AST source and a generation number (space- and time-optimized for
the case where there is no external source).
* Each time the 'most recent' pointer is queried, if it has an external source,
we check whether it's up to date, and update it if not.
* The ancillary data stored on the canonical declaration is allocated lazily
to avoid filling it in for declarations that end up being non-canonical.
We'll still perform a redundant (ASTContext) allocation if someone asks for
the most recent declaration from a decl before setPreviousDecl is called,
but such cases are probably all bugs, and are now easy to find.
Some finessing is still in order here -- in particular, we use a very general
mechanism for handling the DefinitionData pointer on CXXRecordData, and a more
targeted approach would be more compact.
Also, the MayHaveOutOfDateDef mechanism should now be expunged, since it was
addressing only a corner of the full problem space here. That's not covered
by this patch.
Early performance benchmarks show that this makes no measurable difference to
Clang performance without modules enabled (and fixes a major correctness issue
with modules enabled). I'll revert if a full performance comparison shows any
problems.
llvm-svn: 209046
|
| |
|
|
|
|
|
| |
declaration merging in modules is unable to find them and we get bogus errors
and even crashes.
llvm-svn: 208944
|
| |
|
|
|
|
|
|
| |
This is a step towards handling these attributes on classes (PR11170).
Differential Revision: http://reviews.llvm.org/D3772
llvm-svn: 208925
|
| |
|
|
|
|
| |
cleaned up a bit of formatting. No functional changes intended.
llvm-svn: 208918
|
| |
|
|
|
|
| |
functional changes intended.
llvm-svn: 208915
|
| |
|
|
|
|
| |
functional changes).
llvm-svn: 208879
|
| |
|
|
|
|
|
| |
pointer and reference types, even if those types are produced by template
instantiation.
llvm-svn: 208825
|
| |
|
|
|
|
|
| |
elaborated-type-specifier, place it in the correct
context.
llvm-svn: 208799
|
| |
|
|
| |
llvm-svn: 208768
|
| |
|
|
| |
llvm-svn: 208758
|
| |
|
|
|
|
|
|
|
| |
resolves to an existing declaration if there are attributes
present.
This gives us something to apply the attributes to.
llvm-svn: 208756
|
| |
|
|
|
|
|
|
|
| |
caused us to perform copy-initialization for the parameters of an allocation
function called by a new-expression multiple times, resulting in us rejecting
allocations that passed non-copyable parameters (and much worse things in
MSVC compat mode, where we potentially called this function multiple times).
llvm-svn: 208724
|
| |
|
|
|
|
|
|
|
| |
source that provides a declaration from a hidden module would not have the
visibility of the produced definition checked. This might matter if an
external source chose to import a new module to provide an extra definition,
but is not observable with our current external sources.
llvm-svn: 208659
|
| |
|
|
| |
llvm-svn: 208516
|
| |
|
|
|
|
| |
implied by 'constexpr'.
llvm-svn: 208511
|
| |
|
|
| |
llvm-svn: 208499
|
| |
|
|
|
|
|
|
| |
Also correct argument/parameter terminology.
No change in functionality.
llvm-svn: 208498
|
| |
|
|
|
|
|
| |
type ,and bridge attribute, checking with static_cast.
// rdar://16756639
llvm-svn: 208474
|
| |
|
|
|
|
|
| |
Required pulling LambdaExpr::Capture into its own header.
No functionality change.
llvm-svn: 208470
|
| |
|
|
|
|
|
|
|
| |
The base class is the culprit/risk here - a sealed/final derived class
with virtual functions and a non-virtual dtor can't accidentally be
polymorphically destroyed (if the base class's dtor is protected - which
also suppresses this warning).
llvm-svn: 208449
|
| |
|
|
|
|
|
| |
only when named selector is declared in TU and it is not declared in a system
header. rdar://16600230
llvm-svn: 208443
|
| |
|
|
| |
llvm-svn: 208402
|
| |
|
|
|
|
|
|
|
|
| |
This lets us diagnose and perform more complete semantic analysis when faced
with errors in the function body or declaration.
By recovering here we provide more consistent diagnostics, particularly during
interactive editing.
llvm-svn: 208394
|
| |
|
|
|
|
|
|
|
| |
a template variable].
A template declaration of a template name can be null in case we have a dependent name or a set of function templates.
Hence use dyn_cast_or_null instead of dyn_cast. Also improve the diagnostic emitted in this case.
llvm-svn: 208313
|
| |
|
|
| |
llvm-svn: 208259
|
| |
|
|
|
|
|
| |
C++. This seems like a pointless (and indeed harmful) restriction to me, so
I've suggested removing it to -core and disabled this diagnostic by default.
llvm-svn: 208254
|
| |
|
|
|
|
|
| |
whether the definition of the template is visible rather than checking whether
the instantiated definition happens to be in an imported module.
llvm-svn: 208150
|
| |
|
|
|
|
| |
have arity mismatches.
llvm-svn: 208146
|
| |
|
|
| |
llvm-svn: 208077
|
| |
|
|
|
|
|
|
|
|
| |
Patch by Kaelyn Takata.
Testcase coming out of creduce will land in a separate commit shortly.
Also, it appears that this callback is used even in a SFINAE context where the results are never displayed.
llvm-svn: 208062
|
| |
|
|
|
|
| |
clause 'proc_bind'
llvm-svn: 208060
|
| |
|
|
|
|
| |
This is in addition to the existing support for typedefs.
llvm-svn: 208053
|
| |
|
|
| |
llvm-svn: 207962
|
| |
|
|
|
|
|
|
| |
Ideally, importing Foo.a from Foo.b would "do the right thing", but
until it does, this patch makes it an error rather than allow it to
silently be ignored.
llvm-svn: 207948
|
| |
|
|
|
|
|
|
|
|
| |
* Fixes a "return" that was indented at the same level as the continuation
from the previous line
* Wrap several lines to 80 columns
* Remove an if check that was always true
* Move a variable declaration slightly closer to its use
llvm-svn: 207922
|
| |
|
|
| |
llvm-svn: 207921
|
| |
|
|
| |
llvm-svn: 207896
|
| |
|
|
|
|
|
|
| |
This was accidentally committed.
This reverts commit r207892.
llvm-svn: 207893
|
| |
|
|
|
|
|
|
|
| |
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
|