| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
| |
llvm-svn: 127111
|
| |
|
|
|
|
|
|
|
|
|
| |
template name as the result of substitution. The qualifier is handled
separately by the tree transformer, so we would end up in an
inconsistent state.
This is actually the last bit of PR9016, and possibly also fixes
PR8965. It takes Boost.Icl from "epic fail" down to a single failure.
llvm-svn: 127108
|
| |
|
|
| |
llvm-svn: 127094
|
| |
|
|
|
|
|
|
|
|
|
| |
template (not a specialization!), use the "injected" function template
arguments, which correspond to the template parameters of the function
template. This is required when substituting into the default template
parameters of template template parameters within a function template.
Fixes PR9016.
llvm-svn: 127092
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
transform the type that replaces the template type parameter. In the
vast majority of cases, there's nothing to do, because most template
type parameters are replaced with something non-dependent that doesn't
need further transformation. However, when we're dealing with the
default template arguments of template template parameters, we might
end up replacing a template parameter (of the template template
parameter) with a template parameter of the enclosing template.
This addresses part of PR9016, but not within function
templates. That's a separate issue.
llvm-svn: 127091
|
| |
|
|
|
|
|
|
| |
that at cc1 level we will always have normalized triple and thus can
provide necessary default based on e.g. environment value (e.g. for
"arm-eabi" triple, etc.)
llvm-svn: 127087
|
| |
|
|
| |
llvm-svn: 127086
|
| |
|
|
| |
llvm-svn: 127085
|
| |
|
|
| |
llvm-svn: 127082
|
| |
|
|
| |
llvm-svn: 127061
|
| |
|
|
|
|
|
|
|
|
| |
use the translation unit as its declaration context, then deserialize
the actual lexical and semantic DeclContexts after the template
parameter is complete. This avoids problems when the DeclContext
itself (e.g., a class template) is dependent on the template parameter
(e.g., for the injected-class-name).
llvm-svn: 127056
|
| |
|
|
|
|
|
|
|
| |
the file contents with it.
Allow remapping a file by specifying another filename whose contents should be loaded if the original
file gets loaded. This allows to override files without having to create & load buffers in advance.
llvm-svn: 127052
|
| |
|
|
|
|
| |
ASTUnit should delete the remapped buffers.
llvm-svn: 127051
|
| |
|
|
|
|
| |
trigger the ExprTemplates.empty() check at the end of a function body
llvm-svn: 127046
|
| |
|
|
| |
llvm-svn: 127042
|
| |
|
|
|
|
|
|
|
| |
too. Fixes PR7900.
While I'm in this area, improve the diagnostic when the type being
destroyed doesn't match either of the types we found.
llvm-svn: 127041
|
| |
|
|
| |
llvm-svn: 127039
|
| |
|
|
|
|
|
|
| |
to cope with non-type templates by providing appropriate
errors. Previously, we would either assert, crash, or silently build a
dependent type when we shouldn't. Fixes PR9226.
llvm-svn: 127037
|
| |
|
|
|
|
|
|
|
|
| |
to find the instantiated declaration within a template instantiation
fails to do so. It's likely that the original instantiation got
dropped due to instantiation failures, which doesn't actually break
the invariants of the AST. This eliminates a number of
crash-on-invalid failures, e.g., PR9300.
llvm-svn: 127030
|
| |
|
|
|
|
| |
properly cope with NULL return values.
llvm-svn: 127024
|
| |
|
|
|
|
|
|
|
|
| |
of getting some footing when user wants to stop at 2nd bar() in following expression when all function calls are inlined.
= bar() + ... + bar() + ...
clang keeps track of column numbers, so we could put location entries for all subexpressions but that will significantly bloat debug info in general, but a location for call expression is helpful here.
llvm-svn: 127018
|
| |
|
|
|
|
|
|
|
|
| |
DependentTemplateSpecializationType during tree transformation, retain
the NestedNameSpecifierLoc as it was used to translate the template
name, rather than reconstructing it from the template name.
Fixes PR9401.
llvm-svn: 127015
|
| |
|
|
|
|
| |
capture the template parameters of template template parameters.
llvm-svn: 127012
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DeclContext once we've created it. This mirrors what we do for
function parameters, where the parameters start out with
translation-unit context and then are adopted by the appropriate
DeclContext when it is created. Also give template parameters public
access and make sure that they don't show up for the purposes of name
lookup.
Fixes PR9400, a regression introduced by r126920, which implemented
substitution of default template arguments provided in template
template parameters (C++ core issue 150).
How on earth could the DeclContext of a template parameter affect the
handling of default template arguments?
I'm so glad you asked! The link is
Sema::getTemplateInstantiationArgs(), which determines the outer
template argument lists that correspond to a given declaration. When
we're instantiating a default template argument for a template
template parameter within the body of a template definition (not it's
instantiation, per core issue 150), we weren't getting any outer
template arguments because the context of the template template
parameter was the translation unit. Now that the context of the
template template parameter is its owning template, we get the
template arguments from the injected-class-name of the owning
template, so substitution works as it should.
llvm-svn: 127004
|
| |
|
|
|
|
|
|
|
|
|
| |
template <class T> void foo();
template <> void foo<int>(); /* Spec 1 */
template <> void foo<int>(); /* Spec 2 */
If we look at the main location of the first explicit specialization (Spec 1) it can be seen that it points to the name of the *second* explicit specialization (Spec 2), which is a redeclaration of Spec1.
Hence, the source range obtained for Spec1 is not only inaccurate, but also invalid (the end location comes before the start location).
llvm-svn: 127002
|
| |
|
|
| |
llvm-svn: 126999
|
| |
|
|
| |
llvm-svn: 126997
|
| |
|
|
| |
llvm-svn: 126996
|
| |
|
|
| |
llvm-svn: 126994
|
| |
|
|
|
|
|
|
|
| |
computing for a nested decl with explicit visibility. This is all part
of the general philosophy of explicit visibility attributes, where
any information that was obviously available at the attribute site
should probably be ignored. Fixes PR9371.
llvm-svn: 126992
|
| |
|
|
|
|
|
| |
this can have any optimization effect, given the opacity of objects pointers,
but you never know.
llvm-svn: 126990
|
| |
|
|
| |
llvm-svn: 126989
|
| |
|
|
|
|
|
| |
bugs with such types. Not sure this is quite how I want the desugaring
and a.k.a. logic to go, but it suffices.
llvm-svn: 126986
|
| |
|
|
|
|
| |
statement has a condition that evaluates to a constant.
llvm-svn: 126977
|
| |
|
|
|
|
| |
rdar://9083431 & http://llvm.org/PR9396.
llvm-svn: 126966
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
1) When we do an instantiation of the injected-class-name type,
provide a proper source location. This is just plain good hygiene.
2) When we're building a NestedNameSpecifierLoc from a CXXScopeSpec,
only return an empty NestedNameSpecifierLoc if there's no
representation.
Both problems contributed to the horrible test case in PR9390 that I
couldn't reduce down to something palatable.
llvm-svn: 126961
|
| |
|
|
|
|
|
|
| |
in order.
This fixes few blocks.exp regressions.
llvm-svn: 126960
|
| |
|
|
| |
llvm-svn: 126952
|
| |
|
|
|
|
| |
http://llvm.org/PR9391.
llvm-svn: 126950
|
| |
|
|
|
|
| |
TemplateSpecializationTypes, which also fixes PR9388.
llvm-svn: 126946
|
| |
|
|
| |
llvm-svn: 126945
|
| |
|
|
| |
llvm-svn: 126943
|
| |
|
|
| |
llvm-svn: 126939
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
parameter, save the instantiated default template arguments along with
the explicitly-specified template argument list. That way, we prefer
the default template template arguments corresponding to the template
template parameter rather than those of its template template argument.
This addresses the likely direction of C++ core issue 150, and fixes
PR9353/<rdar://problem/9069136>, bringing us closer to the behavior of
EDG and GCC.
llvm-svn: 126920
|
| |
|
|
| |
llvm-svn: 126919
|
| |
|
|
|
|
| |
destructors.
llvm-svn: 126910
|
| |
|
|
| |
llvm-svn: 126909
|
| |
|
|
| |
llvm-svn: 126907
|
| |
|
|
| |
llvm-svn: 126897
|
| |
|
|
| |
llvm-svn: 126890
|