| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
llvm-svn: 127120
|
| |
|
|
| |
llvm-svn: 127119
|
| |
|
|
|
|
| |
ExtProtoInfo.", this time with the missing header.
llvm-svn: 127118
|
| |
|
|
|
|
|
|
| |
ExtProtoInfo."
It seems missing "clang/Basic/ExceptionSpecificationType.h".
llvm-svn: 127115
|
| |
|
|
| |
llvm-svn: 127112
|
| |
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
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
|
| |
|
|
| |
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
|
| |
|
|
|
|
|
| |
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
|
| |
|
|
| |
llvm-svn: 126952
|
| |
|
|
|
|
| |
TemplateSpecializationTypes, which also fixes PR9388.
llvm-svn: 126946
|
| |
|
|
| |
llvm-svn: 126945
|
| |
|
|
| |
llvm-svn: 126943
|
| |
|
|
| |
llvm-svn: 126939
|
| |
|
|
| |
llvm-svn: 126919
|
| |
|
|
|
|
| |
This reverts commit 126863.
llvm-svn: 126886
|
| |
|
|
|
|
|
| |
nested-name-specifier and improve the detection of implicit 'this'
bases. Fixes <rdar://problem/8750392>.
llvm-svn: 126880
|
| |
|
|
| |
llvm-svn: 126879
|
| |
|
|
| |
llvm-svn: 126863
|
| |
|
|
|
|
|
|
|
|
|
|
| |
template arguments. I believe that this is the last place in the AST
where we were storing a source range for a nested-name-specifier
rather than a proper nested-name-specifier location structure. (Yay!)
There is still a lot of cleanup to do in the TreeTransform, which
doesn't take advantage of nested-name-specifiers with source-location
information everywhere it could.
llvm-svn: 126844
|
| |
|
|
|
|
|
|
|
|
| |
of an Objective-C method to be overridden on a case-by-case basis. This
is a higher-level tool than ns_returns_retained &c.; it lets users specify
that not only does a method have different retain/release semantics, but
that it semantically acts differently than one might assume from its name.
This in turn is quite useful to static analysis.
llvm-svn: 126839
|
| |
|
|
|
|
|
|
| |
conventional categories into Basic and AST. Update the self-init checker
to use this logic; CFRefCountChecker is complicated enough that I didn't
want to touch it.
llvm-svn: 126817
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
template specialization types. This also required some parser tweaks,
since we were losing track of the nested-name-specifier's source
location information in several places in the parser. Other notable
changes this required:
- Sema::ActOnTagTemplateIdType now type-checks and forms the
appropriate type nodes (+ source-location information) for an
elaborated-type-specifier ending in a template-id. Previously, we
used a combination of ActOnTemplateIdType and
ActOnTagTemplateIdType that resulted in an ElaboratedType wrapped
around a DependentTemplateSpecializationType, which duplicated the
keyword ("class", "struct", etc.) and nested-name-specifier
storage.
- Sema::ActOnTemplateIdType now gets a nested-name-specifier, which
it places into the returned type-source location information.
- Sema::ActOnDependentTag now creates types with source-location
information.
llvm-svn: 126808
|
| |
|
|
|
|
|
|
| |
and RHS are "unused" (side-effect free).
Patch by Justin Bogner! Fixes PR 8282.
llvm-svn: 126779
|
| |
|
|
|
|
|
|
| |
template specialization types. There are still a few rough edges to
clean up with some of the parser actions dropping
nested-name-specifiers too early.
llvm-svn: 126776
|
| |
|
|
| |
llvm-svn: 126772
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
nested-name-speciciers within elaborated type names, e.g.,
enum clang::NestedNameSpecifier::SpecifierKind
Fixes in this iteration include:
(1) Compute the type-source range properly for a dependent template
specialization type that starts with "template template-id ::", as
in a member access expression
dep->template f<T>::f()
This is a latent bug I triggered with this change (because now we're
checking the computed source ranges for dependent template
specialization types). But the real problem was...
(2) Make sure to set the qualifier range on a dependent template
specialization type appropriately. This will go away once we push
nested-name-specifier locations into dependent template
specialization types, but it was the source of the
valgrind errors on the buildbots.
llvm-svn: 126765
|
| |
|
|
|
|
| |
one.
llvm-svn: 126756
|
| |
|
|
|
|
| |
location information for elaborated types. *sigh*
llvm-svn: 126753
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
information for qualifier type names throughout the parser to address
several problems.
The commit message from r126737:
Push nested-name-specifier source location information into elaborated
name types, e.g., "enum clang::NestedNameSpecifier::SpecifierKind".
Aside from the normal changes, this also required some tweaks to the
parser. Essentially, when we're looking at a type name (via
getTypeName()) specifically for the purpose of creating an annotation
token, we pass down the flag that asks for full type-source location
information to be stored within the returned type. That way, we retain
source-location information involving nested-name-specifiers rather
than trying to reconstruct that information later, long after it's
been lost in the parser.
With this change, test/Index/recursive-cxx-member-calls.cpp is showing
much improved results again, since that code has lots of
nested-name-specifiers.
llvm-svn: 126748
|
| |
|
|
|
|
| |
buildbot breakage.
llvm-svn: 126746
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
name types, e.g., "enum clang::NestedNameSpecifier::SpecifierKind".
Aside from the normal changes, this also required some tweaks to the
parser. Essentially, when we're looking at a type name (via
getTypeName()) specifically for the purpose of creating an annotation
token, we pass down the flag that asks for full type-source location
information to be stored within the returned type. That way, we retain
source-location information involving nested-name-specifiers rather
than trying to reconstruct that information later, long after it's
been lost in the parser.
With this change, test/Index/recursive-cxx-member-calls.cpp is showing
much improved results again, since that code has lots of
nested-name-specifiers.
llvm-svn: 126737
|
| |
|
|
|
|
| |
functionality intended.
llvm-svn: 126730
|
| |
|
|
|
|
|
|
|
|
|
|
| |
DependentNameTypeLoc. Teach the recursive AST visitor and libclang how to
walk DependentNameTypeLoc nodes.
Also, teach libclang about TypedefDecl source ranges, so that we get
those. The massive churn in test/Index/recursive-cxx-member-calls.cpp
is a good thing: we're annotating a lot more of this test correctly
now.
llvm-svn: 126729
|
| |
|
|
|
|
| |
in functionality intended.
llvm-svn: 126727
|
| |
|
|
|
|
|
|
|
|
| |
source-location information into a NestedNameSpecifierLocBuilder
class, which lives within the AST library and centralize all knowledge
of the format of nested-name-specifier location information here.
No functionality change.
llvm-svn: 126716
|
| |
|
|
|
|
| |
MemberExpr, the last of the expressions with qualifiers!
llvm-svn: 126688
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
UnresolvedLookupExpr and UnresolvedMemberExpr.
Also, improve the computation that checks whether the base of a member
expression (either unresolved or dependent-scoped) is implicit. The
previous check didn't cover all of the cases we use in our
representation, which threw off source-location information for these
expressions (which, in turn, caused some breakage in libclang's token
annotation).
llvm-svn: 126681
|
| |
|
|
|
|
|
|
| |
CXXDependentScopeMemberExpr, and clean up instantiation of
nested-name-specifiers with dependent template specialization types in
the process.
llvm-svn: 126663
|
| |
|
|
|
|
|
|
| |
dependent template names. There is still a lot of redundant code in
TreeTransform to cope with TemplateSpecializationTypes, which I'll
remove in stages.
llvm-svn: 126656
|
| |
|
|
| |
llvm-svn: 126653
|