IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Fix cases (seen in roottest/cling/typedef/assertTypedefIter.C) where
a template parameter is an expression that is actually part of a
template parameter pack. In this case we need to peek into the pack.
When the type comes (directly or indirectly) from being used as a template paramater, it is decorated
by SubstTemplateTypeParmType which gets in the way of properly getting the name correct (leads to
'std::const string'.
When looking up in the list of type to be replaced by a typedef (basic_string -> string), use
the canonical type to make sure we have the right search (any sugar will make the search fail).
This is the case for example with gcc's
__gnu_cxx::__common_pool_policy<__gnu_cxx::__pool,true>
where __pool is actually a class template.
Also reduce (a little bit) code duplication.
This is the case for example with gcc's
__gnu_cxx::__common_pool_policy<__gnu_cxx::__pool,true>
where __pool is actually a class template.
Also reduce (a little bit) code duplication.
GetPartiallyDesaguredType now desugar template alias
but does not yet properly propagate the opaque typedef
and thus:
template <typename T> using myvector = std::vector<T>;
myvector<Double32_t> vd32d;
template<class T> using ptr = T*;
ptr<Double32_t> p3;
Both currently result in the Double32_t being ignored.
The partial desugaring (part of normalization) now strips a typedef
even when it original from std and points to compiler details (__gnu_cxx, etc.).
The cost of this convenience was the fact the same entity could have different
'name' and thus different class even-though they were supposed to be strictly
equivalent. i.e. depending on the way to get to the class it could be name
vector<int*>::iterator or __gnu_cxx::iterator<int*> or std::iterator<int*>.
This different from the case where we have a strictly bidirectional equivalent
between the class and its unique typedef (yes, we are talking about you std::string).
This also different from the case where there is a semantic difference between
the two possible name. I.e. where an opaque typedef is used. For example,
vector<Double32_t> and vector<double> and where the 'way' to get to the type[name]
is relevant.
Currently only implemented for the STL collection.
This could eventually be used to allow customization
of which default argument to strip and which class template.
For now, it is only used to prevent the addition of template
default template argument to the STL collection ... which
we would any strip.
This fixes the secondary issue in ROOT-6020 (one class template
instance having more than one corresponding TClass due to the
inconsistency in the normalization (not adding vs not stripping)
This got lost in 2b6ae0aed / 96a4437c8 where typedefs were handled.
Simplify logic (and thus shorten code).
Fixes error in roottest/root/tree/addresses:
Error in <TStreamerInfo::Build>: Embedded_objects, unknown type: EmbeddedTypedef::Embedded3 m_emb4
They were once identical but then got bug fixed out of sync.
Moved routines:
GetFullyQualifiedLocalType()
GetFullyQualifiedType()
CreateNestedNameSpecifier()
CreateNestedNameSpecifierForScopeOf()
GetFullyQualifiedTypeNNS()
TClassEdit::ResolveTypedef was not properly handling the leading const
if there is a namespace in the name (and no template).
Transform::GetPartiallyDesugaredType was not keeping the 'const' in case
the target of the typedef was in the global scope (for example being a
fundamental type).
This fixes ROOT-5576
For example:
namespace edm {
template <int I> class Hash {};
const int typeN =1;
typedef Hash<typeN> ParentageID;
}
edm::ParentageID should be desugared to edm::Hash<1>.
Rather than skipping the desugaring of typedef pointing to anything in std, we
skip the desugaring of typedef pointing to a type starting with an underscore.
Add struct cling::utils::Transform::Config to hold both the list of typedef to
avoid desugaring (m_toSkip) and the list of type to replace by a nicer typedef
(m_toReplace).
This is used to replace basic_string<...> by std::string.
GetPartiallyDesugaredType was 'forgetting' to add full qualification of the
template parameters in some case (where the template paramter in the
QualType was not yet an elaborated type). Extend the internal interface to
distinguish when we need to add full qualification to the type itself or its
template parameters.
It is very weird, clang documentation says:
ASTContext::CreateTypeSourceInfo - Allocate an uninitialized TypeSourceInfo...
ASTContext::getTrivialTypeSourceInfo - Allocate a TypeSourceInfo where all locations...
We should use the getTrivialTypeSourceInfo all over the place...
git-svn-id: http://root.cern.ch/svn/root/trunk@49343 27541ba8-7e3a-0410-8455-c3a389f83636
and the case where the typedef (or the type) has a partially qualified name (we need to complete it) and
double check that we do not have :: in front.
This fixes the result when scanning through:
class Embedded_objects {
public:
typedef std::vector<int> vecint;
vecint::iterator m_iter;
typedef vector<int> vecint2;
vecint2::iterator m_iter2;
};
namespace NS1 {
namespace NS2 {
namespace NS3 {
class Point {};
class Inner3 {
public:
Point p1;
NS3::Point p2;
::NS1::NS2::NS3::Point p3;
};
}
}
}
Also remove some llvm:: and clang::
git-svn-id: http://root.cern.ch/svn/root/trunk@48792 27541ba8-7e3a-0410-8455-c3a389f83636
we now explicitly control exactly which types get
desugared and which do not. The current set which
does get desugared is a first pass at what we need,
I fully expect we will have to tune it as we do
more debugging of roottest.
git-svn-id: http://root.cern.ch/svn/root/trunk@47719 27541ba8-7e3a-0410-8455-c3a389f83636
GCC implements it but there is a comment saying:
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR 464. Suggestion for new member functions in standard containers.
// data access
Use standartized alternative.
git-svn-id: http://root.cern.ch/svn/root/trunk@46710 27541ba8-7e3a-0410-8455-c3a389f83636
expression in the wrapper function and do things with it. In some cases we
must consider variable declarations as expressions (eg. int i = 5;) and take
the l-value and build a DeclRefExpr and return it.
Extract that common functionality out in a utility function and call it whenever
needed.
git-svn-id: http://root.cern.ch/svn/root/trunk@46668 27541ba8-7e3a-0410-8455-c3a389f83636
* Avoid alloc/dealloc of the entire body of the function (the CompoundStmt) by
using ugly iterator + offset tricks.
git-svn-id: http://root.cern.ch/svn/root/trunk@46553 27541ba8-7e3a-0410-8455-c3a389f83636
qualifiers (const std::string) in template arguments.
Fix the handling of default template argument that are not a type.
No longer drop any default argument except for STL collection (as needed by ROOT I/O).
This fixes support of (for example):
#pragma link C++ class std::pair<const std::string,int>+;
#pragma link C++ class ROOT::TArrayProxy<ROOT::TArrayType<double> >+;
(which is ROOT::TArrayProxy<ROOT::TArrayType<double,0> >)
git-svn-id: http://root.cern.ch/svn/root/trunk@46188 27541ba8-7e3a-0410-8455-c3a389f83636
we are given a qualified typedef (the first node is 'Elaborated' rather
than Typedef), for example ROOT::Math::TDataPoint1D.
Also properly handle the case when the scope of the typedef's underlying
type and the scope of the typedef are different. In the case their are
the same, keeping the version given as input (after 'normalizing).
Prevent the desugaring of _any_ typedef declared within the std namespace
(for now hardcoded in AST.cpp) to avoid exposing to ROOT implementation
details (this is a kind of replacement for CINT's customized STL header)
git-svn-id: http://root.cern.ch/svn/root/trunk@46131 27541ba8-7e3a-0410-8455-c3a389f83636