| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
appropriately, especially when they appear within class templates.
llvm-svn: 191548
|
|
|
|
|
|
|
|
|
| |
template and defined outside it, don't instantiate it twice when instantiating
the surrounding class template specialization. That would cause us to reject
the code because we think two partial specializations instantiated to produce
the same signature.
llvm-svn: 191418
|
|
|
|
| |
llvm-svn: 191237
|
|
|
|
|
|
|
|
|
|
| |
an additional conversion (other than a qualification conversion) would be
required after the explicit conversion.
Conversely, do allow explicit conversion functions to be used when initializing
a temporary for a reference binding in direct-list-initialization.
llvm-svn: 191150
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
variable from being the function to being the enclosing namespace scope (in
C++) or the TU (in C). This allows us to fix a selection of related issues
where we would build incorrect redeclaration chains for such declarations, and
fail to notice type mismatches.
Such declarations are put into a new IdentifierNamespace, IDNS_LocalExtern,
which is only found when searching scopes, and not found when searching
DeclContexts. Such a declaration is only made visible in its DeclContext if
there are no non-LocalExtern declarations.
llvm-svn: 191064
|
|
|
|
|
|
| |
This reverts commit r190895 which reverted r190892.
llvm-svn: 190904
|
|
|
|
|
|
| |
This reverts commit r190892.
llvm-svn: 190895
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
When selecting a mangling for an anonymous tag type:
- We should first try it's typedef'd name.
- If that doesn't work, we should mangle in the name of the declarator
that specified it as a declaration specifier.
- If that doesn't work, fall back to a static mangling of
<unnamed-type>.
This should make our anonymous type mangling compatible.
This partially fixes PR16994; we would need to have an implementation of
scope numbering to get it right (a separate issue).
Reviewers: rnk, rsmith, rjmccall, cdavis5x
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1540
llvm-svn: 190892
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When an AST file is built based on another AST file, it can use a decl from
the fist file, and therefore mark the "isUsed" bit. We need to note this in
the AST file so that the bit is set correctly when the second AST file is
loaded.
This patch introduces the distinction between setIsUsed() and markUsed() so
that we don't call into the ASTMutationListener callback when it wouldn't
be appropriate.
Fixes PR16635.
llvm-svn: 190016
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
We would not perform substitution at an appropriate point, allowing strange
results to appear. We would accepts things that we shouldn't or mangle things incorrectly. Note that this hasn't fixed the other cases like
template-template parameters or non-type template parameters.
Reviewers: doug.gregor, rjmccall, rsmith
Reviewed By: rsmith
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1507
llvm-svn: 189540
|
|
|
|
|
|
|
|
| |
This was only used to ensure that the traversal order was the same as the
insertion order, but that guarantee was already being provided by the use
of a FoldingSetVector.
llvm-svn: 189075
|
|
|
|
| |
llvm-svn: 188974
|
|
|
|
|
|
| |
least one bug, as it does not respect the variable template specialization hierarchy well.
llvm-svn: 188969
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
HandleTopLevelDecl on a templated function leads us to try and mangle
it.
Reviewers: rsmith
Reviewed By: rsmith
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1412
llvm-svn: 188536
|
|
|
|
|
|
|
|
|
|
|
| |
referenced as a member of the current instantiation. In that case, deduce the
type of the function to a dependent type rather than exposing an undeduced auto
type to the rest of the current instantiation.
The standard doesn't really say that the type is dependent in this case; I'll
bring this up with CWG.
llvm-svn: 188410
|
|
|
|
|
|
| |
variable
llvm-svn: 188350
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a local extern declaration redeclares some other entity, the type of that
entity is merged with the prior type if the prior declaration is visible (in C)
or is declared in the same scope (in C++).
- Make LookupRedeclarationWithLinkage actually work in C++, use it in the right
set of cases, and make it track whether it found a shadowed declaration.
- Track whether we found a declaration in the same scope (for C++) including
across serialization and template instantiation.
llvm-svn: 188307
|
|
|
|
|
|
| |
cases...
llvm-svn: 188249
|
|
|
|
|
|
|
|
| |
instantiated in this scope")
Differential Revision: http://llvm-reviews.chandlerc.com/D920
llvm-svn: 188137
|
|
|
|
| |
llvm-svn: 188134
|
|
|
|
|
|
| |
-fdelayed-template-parsing mode. Patch by Will Wilson!
llvm-svn: 187916
|
|
|
|
|
|
| |
templates from Parser to Sema.
llvm-svn: 187770
|
|
|
|
|
|
| |
Sema.
llvm-svn: 187768
|
|
|
|
| |
llvm-svn: 187765
|
|
|
|
|
|
| |
fully supported, up to some limitations documented as FIXMEs or TODO. Static data member templates work very partially. Static data member templates of class templates need particular attention...
llvm-svn: 187762
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change unifies the logic for template instantiation of methods and
functions declared with typedefs.
It ensures that SubstFunctionType() always fills the Params out param
with non-null ParmVarDecls or returns null.
Reviewers: rsmith
Differential Revision: http://llvm-reviews.chandlerc.com/D1135
llvm-svn: 187528
|
|
|
|
|
|
|
|
|
|
|
|
| |
No functionality change.
In Sema helper functions:
* renamed isTypeName as HasTypenameKeyword
In UsingDecl:
* renamed get/setUsingLocation to get/setUsingLoc
* renamed is/setTypeName as has/setTypename
llvm-svn: 186816
|
|
|
|
| |
llvm-svn: 186702
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r186331).
Original commit log:
If we friend a declaration twice, that should not make it visible to
name lookup in the surrounding context. Slightly rework how we handle
friend declarations to inherit the visibility of the prior
declaration, rather than setting a friend declaration to be visible
whenever there was a prior declaration.
llvm-svn: 186546
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This breaks the build of basic patterns with repeated friend
declarations. See the added test case in SemaCXX/friend.cpp or the test
case reported to the original commit log.
Original commit log:
If we friend a declaration twice, that should not make it visible to
name lookup in the surrounding context. Slightly rework how we handle
friend declarations to inherit the visibility of the prior
declaration, rather than setting a friend declaration to be visible
whenever there was a prior declaration.
llvm-svn: 186331
|
|
|
|
|
|
|
|
| |
does not substitute a sizeof-pack expression.
The solution is proposed by Richard Smith.
Differential Revision: http://llvm-reviews.chandlerc.com/D869
llvm-svn: 186306
|
|
|
|
|
|
|
|
|
|
|
| |
Original commit log:
If we friend a declaration twice, that should not make it visible to
name lookup in the surrounding context. Slightly rework how we handle
friend declarations to inherit the visibility of the prior
declaration, rather than setting a friend declaration to be visible
whenever there was a prior declaration.
llvm-svn: 186199
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fix is.
Original commit log:
If we friend a declaration twice, that should not make it visible to
name lookup in the surrounding context. Slightly rework how we handle
friend declarations to inherit the visibility of the prior
declaration, rather than setting a friend declaration to be visible
whenever there was a prior declaration.
llvm-svn: 186185
|
|
|
|
|
|
|
|
|
| |
lookup in the surrounding context. Slightly rework how we handle friend
declarations to inherit the visibility of the prior declaration, rather
than setting a friend declaration to be visible whenever there was a prior
declaration.
llvm-svn: 186040
|
|
|
|
| |
llvm-svn: 185997
|
|
|
|
|
|
|
|
|
| |
This replaces a long list of declarations for visitor functions with
a list generated from DeclNodes.inc. Nothing really interesting came
out of it; we had comprehensive coverage anyway
(excluding FriendTemplateDecls).
llvm-svn: 185118
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As noted by Richard in the post:
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130624/082605.html, the following code should not add an entry
into PendingLocalImplicitInstantiations, since local instantiations
should only occur within the context of other instantiations:
int foo(double y) {
struct Lambda {
template<class T> T operator()(T t) const { return t; };
} lambda;
return lambda(y);
}
Hence the attached code does the following:
1) In MarkFunctionReferenced, check if ActiveInstantiations.size()
is non-zero before adding to PendingLocalImplicitInstantiations.
2) In InstantiateFunctionDefinition, we swap out/in
PendingLocalImplicitInstantiations so that only those
pending local instantiations that are added during the instantiation
of the current function are instantiated recursively.
llvm-svn: 184903
|
|
|
|
|
|
| |
pack expanded constructor initializer list. Fixes PR16303!
llvm-svn: 183878
|
|
|
|
|
|
|
|
| |
Made significantly easier with git-clang-format.
Differential Revision: http://llvm-reviews.chandlerc.com/D947
llvm-svn: 183694
|
|
|
|
| |
llvm-svn: 183637
|
|
|
|
| |
llvm-svn: 183636
|
|
|
|
|
|
|
|
| |
places which weren't setting it up properly. This allows us to get the right
cv-qualifiers for 'this' when it appears outside a method body in a class
template.
llvm-svn: 183483
|
|
|
|
|
|
|
|
|
| |
instantiate the inherited constructor template and mark that as the constructor
which the instantiated specialization is inheriting. This fixes a
crash-on-valid when trying to compute the exception specification of a
specialization of the inheriting constructor.
llvm-svn: 182072
|
|
|
|
| |
llvm-svn: 181683
|
|
|
|
| |
llvm-svn: 181113
|
|
|
|
|
|
|
| |
Missing (somewhat ironically) is support for the new deduction rules
in lambda functions, plus PCH support for return type patching.
llvm-svn: 181108
|
|
|
|
| |
llvm-svn: 181077
|
|
|
|
|
|
| |
Patch by Robert Wilhelm.
llvm-svn: 180682
|
|
|
|
|
|
|
|
| |
references thereto.
Patch by Tong Shen!
llvm-svn: 179585
|
|
|
|
|
|
|
| |
This fixes pr15753. This is another case of the fuzzy definition of the
"as written" storage class of an instantiation.
llvm-svn: 179581
|