| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
|
| |
type-specifier in C++. Some checks will assert in this case otherwise (in
particular, the access specifier may be missing if this happens inside a class
definition, due to a violation of an AST invariant).
llvm-svn: 198721
|
| |
|
|
|
|
|
| |
encodes the canonical rules for LLVM's style. I noticed this had drifted
quite a bit when cleaning up LLVM, so wanted to clean up Clang as well.
llvm-svn: 198686
|
| |
|
|
|
|
|
|
| |
unneeded typecasts. getScopeRep() already returns a NestedNameSpecifier.
No functional changes intended.
llvm-svn: 198414
|
| |
|
|
|
|
|
|
|
|
| |
is specialized by an explicit specialization, start from the first declaration
in case we've got a member of a class template (redeclarations might not number
the template parameters the same way).
Our recover here is still far from ideal.
llvm-svn: 197305
|
| |
|
|
|
|
| |
This fixes pr18141.
llvm-svn: 196855
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The standard is pretty clear on what it allows inside of template
arguments for non-type template parameters of pointer-to-member.
They must be of the form &qualified-id and cannot come from sources like
constexpr VarDecls or things of that nature.
This fixes PR18192.
llvm-svn: 196852
|
| |
|
|
|
|
|
| |
instantiation appears in a non-enclosing namespace (the previous diagnostic
talked about the C++98 rule even in C++11 mode).
llvm-svn: 196642
|
| |
|
|
|
|
|
| |
name from the enclosing namespace set if the name is specified as a
qualified-id.
llvm-svn: 196464
|
| |
|
|
|
|
|
|
|
| |
nested-name-specifier, rather than crashing. (In fact, reject all
literal-operator-ids that have a non-namespace nested-name-specifier). The
grammar doesn't allow these in some cases, and in other cases does allow them
but instantiation will always fail.
llvm-svn: 196443
|
| |
|
|
|
|
| |
to a variable template specialization.
llvm-svn: 196337
|
| |
|
|
|
|
| |
simple-template-ids (eg, 'operator+<int>') in weird places.
llvm-svn: 196333
|
| |
|
|
|
|
|
|
| |
Before we were considering them only when instantiating templates.
This fixes pr18033.
llvm-svn: 196050
|
| |
|
|
|
|
|
|
|
|
|
| |
We would fail to instantiate them when the surrounding function was
instantiated. Instantiate the class and add it's members to the list of
pending instantiations, they should be resolved when we are finished
with the function's body.
This fixes PR9685.
llvm-svn: 195827
|
| |
|
|
|
|
|
| |
There are about 30 removed in this patch, generated by a new FixIt I haven't
got round to submitting yet.
llvm-svn: 195814
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous patches tried to deduce the correct function type. I now realize
this is not possible in general. Consider
class foo {
template <typename T> static void bar(T v);
};
extern template void foo::bar(const void *);
We will only know that bar is static after a lookup, so we have to handle this
in the template instantiation code.
This patch reverts my previous two changes (but not the tests) and instead
handles the issue in DeduceTemplateArguments.
llvm-svn: 195154
|
| |
|
|
|
|
| |
support.
llvm-svn: 194273
|
| |
|
|
|
|
| |
inappropriately in non-type template arguments
llvm-svn: 193462
|
| |
|
|
|
|
|
|
|
|
|
|
| |
with an IndirectFieldDecl
We only considered FieldDecl and CXXMethodDecl as appropriate which
would cause us to believe the IndirectFieldDecl corresponded to an
argument of it's field type instead of a pointer-to-member type.
This fixes PR17696.
llvm-svn: 193461
|
| |
|
|
|
|
|
|
|
|
|
| |
We would not identify pointer-to-member construction in a non-type
template argument if it was either a FieldDecl or a CXXMethodDecl.
However, this would incorrectly reject declarations that were injected
via an IndirectFieldDecl (e.g. a field inside of an anonymous union).
This fixes PR17657.
llvm-svn: 193203
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Enforce the rule in C++11 [temp.mem]p2 that local classes cannot have
member templates.
This fixes PR16947.
N.B. C++14 has slightly different wording to afford generic lambdas
declared inside of functions.
Fun fact: Some formulations of local classes with member templates
would cause clang to crash during Itanium mangling, such as the
following:
void outer_mem() {
struct Inner {
template <typename = void>
struct InnerTemplateClass {
static void itc_mem() {}
};
};
Inner::InnerTemplateClass<>::itc_mem();
}
Reviewers: eli.friedman, rsmith, doug.gregor, faisalv
Reviewed By: doug.gregor
CC: cfe-commits, ygao
Differential Revision: http://llvm-reviews.chandlerc.com/D1866
llvm-svn: 193144
|
| |
|
|
|
|
| |
holdover from the long-dead Action interface.
llvm-svn: 192203
|
| |
|
|
|
|
|
|
|
|
| |
The bool conversion operator on InstantiatingTemplate never added value and
only served to obfuscate the template instantiation routines.
This replaces the conversion and its callers with an explicit isInvalid()
function to make it clear what's going on at a glance.
llvm-svn: 192177
|
| |
|
|
|
|
|
|
|
| |
uses.
This fixes one of the two remaining failures to implement [[deprecated]]
as specified for C++14.
llvm-svn: 191572
|
| |
|
|
|
|
| |
appropriately, especially when they appear within class templates.
llvm-svn: 191548
|
| |
|
|
|
|
| |
something, for variable templates.
llvm-svn: 191278
|
| |
|
|
| |
llvm-svn: 190959
|
| |
|
|
|
|
| |
argument list, but could be instantiated with argument list of <>.
llvm-svn: 190913
|
| |
|
|
|
|
|
| |
call; remove its 'number of explicit arguments' and 'what kind of call'
parameters.
llvm-svn: 190444
|
| |
|
|
|
|
|
|
|
|
| |
As requested when applying the same logic to calling conventions.
Reviewers: rsmith
Differential Revision: http://llvm-reviews.chandlerc.com/D1634
llvm-svn: 190441
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Calling conventions are inherited during decl merging. Before this
change, deduction would fail due to a type mismatch between the template
and the specialization. This change adjusts the CCs to match before
deduction, and lets the decl merging logic diagnose mismatch or inherit
the CC from the template.
This allows specializations of static member function templates in the
Microsoft C++ ABI.
Reviewers: rsmith
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1570
llvm-svn: 190377
|
| |
|
|
| |
llvm-svn: 189857
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
- Some documenation were added.
- Usages of OpaquePtr<A>.getAsVal<A>() were replaced by OpaquePtr<A>.get().
- Methods getAs and getAsVal were renamed to getPtrTo and getPtrAs respectively.
llvm-svn: 189346
|
| |
|
|
|
|
| |
and function templates.
llvm-svn: 189152
|
| |
|
|
|
|
| |
No functionality change intended.
llvm-svn: 189112
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
There were two things known to be wrong with our implementation of MSVC
mode template arguments:
- We didn't properly handle __uuidof/CXXUuidofExpr and skipped all type
checking completely.
- We didn't allow for MSVC's extension of allowing certain constant
"foldable" expressions from showing up in template arguments.
They allow various casts dereference and address-of operations.
We can make it more general as we find further peculiarities but this
is the known extent.
Reviewers: rsmith, doug.gregor, rjmccall
Reviewed By: doug.gregor
CC: cfe-commits, rnk
Differential Revision: http://llvm-reviews.chandlerc.com/D1444
llvm-svn: 189087
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
least one bug, as it does not respect the variable template specialization hierarchy well.
llvm-svn: 188969
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
DeclRefExpr::getDecl gives us back a ValueDecl, this isa<> check will
never fire.
Reviewers: eli.friedman, doug.gregor, majnemer
Reviewed By: majnemer
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1434
llvm-svn: 188647
|
| |
|
|
|
|
|
| |
preparation for teaching this function how to diagnose a correction that
includes importing a module.
llvm-svn: 188602
|
| |
|
|
|
|
| |
variable
llvm-svn: 188350
|
| |
|
|
|
|
|
|
| |
of local classes. We were previously handling this by performing qualified
lookup within a function declaration(!!); replace it with the proper scope
lookup.
llvm-svn: 188050
|
| |
|
|
|
|
| |
-fdelayed-template-parsing mode. Patch by Will Wilson!
llvm-svn: 187916
|
| |
|
|
| |
llvm-svn: 187784
|
| |
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
any default template arguments, not if it inherits some.
llvm-svn: 186804
|
| |
|
|
|
|
| |
[-Wdocumentation]
llvm-svn: 186802
|
| |
|
|
| |
llvm-svn: 186794
|
| |
|
|
|
|
|
|
| |
templates and explicit specializations
This patch essentially removes all the FIXMEs following calls to DeduceTemplateArguments() that want to keep track of deduction failure info.
llvm-svn: 186730
|
| |
|
|
|
|
|
|
| |
diagnosis of bad template argument deductions."
This reverts commit a730f548325756d050d4caaa28fcbffdae8dfe95.
llvm-svn: 186729
|