Commit Graph

261 Commits

Author SHA1 Message Date
Vassil Vassilev
24cdb599f7 In many modes (eg like evaluate and value print) we need to find the last
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
2012-10-19 09:22:36 +00:00
Vassil Vassilev
ec129305af Centralize the unique name prefix (the names generated by the interpreter use it)
and provide utility function which checks if a decls has such name.


git-svn-id: http://root.cern.ch/svn/root/trunk@46593 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-17 08:52:24 +00:00
Vassil Vassilev
ae3a0dfdad * Factor out the duplicate code.
* 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
2012-10-15 16:57:53 +00:00
Vassil Vassilev
a67f0ebca8 * Add another overload taking DeclarationName as an argument. This is useful when
we have to deal with failed lookups.
* Improve documentation.


git-svn-id: http://root.cern.ch/svn/root/trunk@46394 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-09 09:41:26 +00:00
Axel Naumann
9e83d653a9 In clang's trunk, asking for the Type of a TemplateArgument is forbidden if it's not a Type.
Indentation.


git-svn-id: http://root.cern.ch/svn/root/trunk@46252 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-28 12:28:14 +00:00
Philippe Canal
c22cd67c6d Fix the handling of B<const Double32_t, const int>
git-svn-id: http://root.cern.ch/svn/root/trunk@46192 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-26 08:01:21 +00:00
Philippe Canal
22952b8f72 Improve the handling of qualified named (i.e. elaborated type) especially when they also have
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
2012-09-25 19:35:24 +00:00
Philippe Canal
f191b6097c fix typo
git-svn-id: http://root.cern.ch/svn/root/trunk@46132 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-22 21:56:36 +00:00
Philippe Canal
fcf8c7fa66 In Transform::GetPartiallyDesugaredType also handle the case where
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
2012-09-22 21:30:24 +00:00
Philippe Canal
d754a4e262 Do not use standard desugaring if we need to have the full qualification
git-svn-id: http://root.cern.ch/svn/root/trunk@46047 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-19 12:39:06 +00:00
Axel Naumann
05ba8a3a07 Move cling from cint/ to interpreter/ (Will add a "we have moved" readme to cint/cling.)
git-svn-id: http://root.cern.ch/svn/root/trunk@45844 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-05 09:37:39 +00:00