Commit Graph

33 Commits

Author SHA1 Message Date
Philippe Canal
d1e545b60d In Partial desugar add support for array type 2014-05-14 09:03:56 +02:00
Axel Naumann
bbf4a3588f Update to XCode 5.1; e.g. ignore type of std::string::c_str(). 2014-03-31 15:15:57 +02:00
Philippe Canal
93ce42bdc3 Preliminary support for template alias.
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.
2014-03-21 16:57:07 +01:00
Philippe Canal
45895aec23 No longer hide the compiler detail.
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.
2014-03-21 16:57:07 +01:00
Axel Naumann
e784149c9b Update tests to new clang output. 2014-03-03 19:11:05 +01:00
Axel Naumann
2a58b82ebe Update tests to new interfaces. 2014-02-19 12:55:00 +01:00
Axel Naumann
d6dfcf82a8 Fix const char * regexp. 2014-01-28 18:59:54 +01:00
Axel Naumann
00e3fd5e7c libc++ fixes, e.g. c_str() returns const_pointer. 2014-01-28 18:21:55 +01:00
Axel Naumann
d240bd5de8 Refer to license in test and demo files. 2014-01-07 12:02:58 +01:00
Philippe Canal
baebf42627 Add comment clarifying ROOT-4602 2013-11-06 21:39:56 +01:00
Philippe Canal
27b213ed73 Properly handled (partial) desugaring of 'const NS::Something_t'
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
2013-11-06 21:39:55 +01:00
Philippe Canal
b96f1409ac In GetPartiallyDesugaredType add support for expression as template parameter.
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>.
2013-10-30 13:44:58 +01:00
Philippe Canal
7b7e237d81 adapt to new interface 2013-09-03 15:26:56 +02:00
Philippe Canal
52da28145b Fix ROOT-5442, wrong normalization of std::vector<myNamespace::myClass1*>::const_iterator
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.
2013-08-29 08:59:59 +02:00
Philippe Canal
ea36f5aa5d Attempt to fix the test on 32 bits platforms
git-svn-id: http://root.cern.ch/svn/root/trunk@48801 27541ba8-7e3a-0410-8455-c3a389f83636
2013-03-02 02:38:59 +00:00
Philippe Canal
5b7940b35d add more test with qualifications
git-svn-id: http://root.cern.ch/svn/root/trunk@48795 27541ba8-7e3a-0410-8455-c3a389f83636
2013-03-01 19:05:54 +00:00
Philippe Canal
6f8d8f8d71 Missed a spot in r48782
git-svn-id: http://root.cern.ch/svn/root/trunk@48784 27541ba8-7e3a-0410-8455-c3a389f83636
2013-03-01 12:29:22 +00:00
Philippe Canal
214fc4f963 We now are stripping the elaborated type so, no more :: prefix
git-svn-id: http://root.cern.ch/svn/root/trunk@48782 27541ba8-7e3a-0410-8455-c3a389f83636
2013-03-01 11:28:35 +00:00
Philippe Canal
e869ee0993 Add testing of the desugaring behavior of typdef inside std
git-svn-id: http://root.cern.ch/svn/root/trunk@48577 27541ba8-7e3a-0410-8455-c3a389f83636
2013-02-14 17:45:49 +00:00
Philippe Canal
a7f6d5c3c9 Finish 48510 SubstTemplateTypeParmType can indeed carry meaningfull qualifier (also add related test)
git-svn-id: http://root.cern.ch/svn/root/trunk@48549 27541ba8-7e3a-0410-8455-c3a389f83636
2013-02-12 18:38:58 +00:00
Philippe Canal
b218b89d4c In the partial desugaring add support for the case where we have a type that point to an already completely desugared template instantiation in which case the type is a RecordDecl rather than a TemplateInstantationType
git-svn-id: http://root.cern.ch/svn/root/trunk@48510 27541ba8-7e3a-0410-8455-c3a389f83636
2013-02-07 22:56:10 +00:00
Philippe Canal
444ffb02a8 Now that we sometimes desugar things directly in std, we need to explicitly not desugar std::string
git-svn-id: http://root.cern.ch/svn/root/trunk@48208 27541ba8-7e3a-0410-8455-c3a389f83636
2013-01-06 17:06:31 +00:00
Philippe Canal
40895f8595 Better version of the output
git-svn-id: http://root.cern.ch/svn/root/trunk@47965 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-11 10:41:56 +00:00
Philippe Canal
d267a7e10e In the GetPartiallyDesugaredType, properly handle the case where the input is partially qualified (input: B::C and the ouput needs to be A::B::C ; i.e. properly handle ElaboratedType as input). Also properly strip the typedef from any of the scopes (A::vecint::iterator -> std::vector<int>::iterator). Add the corresponding test
git-svn-id: http://root.cern.ch/svn/root/trunk@47958 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-11 08:26:00 +00:00
Axel Naumann
bb0cacfb13 More rvalue-const removal
git-svn-id: http://root.cern.ch/svn/root/trunk@47173 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-11 16:38:14 +00:00
Axel Naumann
716729e5eb Don't append "const" for rvalues for increased CINT compatibility.
Might re-introduce later.


git-svn-id: http://root.cern.ch/svn/root/trunk@47171 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-11 16:15:35 +00:00
Philippe Canal
d1f4b8c39e Add code and testing for classes declared inside an anymous namespace
git-svn-id: http://root.cern.ch/svn/root/trunk@46841 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-26 19:51:56 +00:00
Philippe Canal
e60b8ce424 extend testing of typedef to reference
git-svn-id: http://root.cern.ch/svn/root/trunk@46679 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-19 13:33:38 +00:00
Vassil Vassilev
3bba03cf9f *The JIT is configured to compile with RTTI so when we #include the SymbolResolverCallback
it looks for typeinfo of the InterpreterCallbacks (compiled with fno-rtti).

*Move the SymbolResolverCallback into InterpreterCallbacks.(h,cpp). Ideally it is 
used only in the testsuite so we could hack in the build system to build the 
SymbolResolverCallback with fno-rtti and include just the header file but that's
for later.
*Set the symbol resolver callback in enableDynamicLookup for now.
*Clear up the logic behind InterpreterExternalSemaSource and InterpreterCallbacks.
*Now the DynamicIDHandler derives from InterpreterExternalSemaSource.
*Adapt the testsuite to the change.
*Request the InterpreterCallback constructor to be put in the binary.


git-svn-id: http://root.cern.ch/svn/root/trunk@46435 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-10 13:00:17 +00:00
Vassil Vassilev
a6a7c6f748 No need of -verify and -I for that test.
git-svn-id: http://root.cern.ch/svn/root/trunk@46410 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-09 16:09:42 +00:00
Vassil Vassilev
b95f52a9f2 remove the inclusion of CompilerInstance
git-svn-id: http://root.cern.ch/svn/root/trunk@46289 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-03 12:57:48 +00:00
Philippe Canal
00f0d19636 Add many more tests ..
git-svn-id: http://root.cern.ch/svn/root/trunk@46209 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-27 08:49:18 +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