Commit Graph

109 Commits

Author SHA1 Message Date
Vassil Vassilev
a1bd767b6b Adapt to interface changes due to upgrade to r302975. 2017-06-08 10:29:13 +02:00
Frederich Munch
7ee942f14e Windows: Avoid mangling Dtor_Comdat 2016-12-15 14:29:09 +01:00
Axel Naumann
1b81e23313 Wrapper must be a FunctionDecl. 2016-08-31 18:14:13 +02:00
Frederich Munch
afe23db9d4 Fix cling when built for 32 bit architectures.
Use uintptr_t as void* and uint64_t are not guaranteed to be the same size.

Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
2016-08-15 15:29:11 +02:00
Axel Naumann
00fd3dbc12 FIXUP: cling/lib/Utils/AST.cpp extra ) 2016-06-15 14:14:33 +02:00
Axel Naumann
961e00ac2f llvm upgrade. 2016-06-15 14:14:33 +02:00
Philippe Canal
c3f961aa67 Avoid unnecessary temporary 2016-06-08 04:29:08 +02:00
Axel Naumann
8af1646f97 Better formulation of "integer of potr size". 2016-02-05 16:14:04 +01:00
Axel Naumann
66736733d9 sizeof(pointer) != sizeof(long) on Windows. 2016-02-05 11:44:09 +01:00
Philippe Canal
a11b9e384e Fix cling::utils::GetPartiallyDesugaredTypeImpl for C++14.
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.
2016-01-02 20:48:01 +01:00
Philippe Canal
81fef9a7b4 Add support for Parameter packs in type(name) normalization.
This fully resolve ROOT-7708.
2015-10-28 19:44:14 +01:00
Philippe Canal
2c9a79514e White spaces 2015-10-28 19:44:14 +01:00
Philippe Canal
26fdb651b9 PrimaryContext returns non null for forward decl, so we need to also grab the def.
This redo d78dac6 that was thought to be superseeded by ca32227
2015-10-15 22:45:06 +02:00
Philippe Canal
32bd423d59 We must pass the primary decl context to Sema's LookupQualifiedName [ROOT-7737].
This is guarded by an assert in Sema::LookupQualifiedName.
2015-10-15 21:33:13 +02:00
Danilo Piparo
c85ce99057 Re-enable "In TypeName::GetFullyQualifiedType, strip SubstTemplateTypeParmType."
This reverts commit 944b1d4fed1851b67236be756094a68be26ae0c2.
2015-10-02 14:09:06 +02:00
Philippe Canal
040bad9a53 Revert "In TypeName::GetFullyQualifiedType, strip SubstTemplateTypeParmType."
This reverts commit 5190ebeb2eb0ac527881ab1c91401b20f4e54b39.

It fails on roottest/root/meta/dictSelection:execAtlasTest2
2015-09-24 15:14:01 +02:00
Philippe Canal
f1fd8d0fd0 In TypeName::GetFullyQualifiedType, strip SubstTemplateTypeParmType.
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'.
2015-09-24 11:15:18 +02:00
Philippe Canal
67ffd34dd5 In GetPartiallyDesugaredTypeImpl fix type replacement.
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).
2015-05-08 19:46:12 +02:00
Axel Naumann
556ac8c3dc Use canonical Decls as key for "do not desugar"; may have dupe Type*s. 2014-10-07 22:20:06 +02:00
Philippe Canal
443fe10fd8 Properly handle the template template args in global scope.
Also properly handle the case where the template template argument as a partially qualified scope
2014-09-18 02:32:02 +02:00
Philippe Canal
29746d4caf Add support for fully qualifying a template argument that is itself a template.
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.
2014-09-18 02:32:02 +02:00
Philippe Canal
42da1a112a Revert "Add support for fully qualifying a template argument that is itself a template."
until we understand the negative side-effects.

This reverts commit 19f18e848d50bd44a011e8cf192f56d73e28bf65.
2014-09-17 23:06:01 +02:00
Philippe Canal
08a86e35eb Add support for fully qualifying a template argument that is itself a template.
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.
2014-09-17 21:33:02 +02:00
Philippe Canal
2aacd83287 Introduce Lookup::Named overload taking a StringRef 2014-09-15 12:26:13 +02:00
Philippe Canal
e4c0a20450 Reduce unnucessary type recreation 2014-09-02 23:01:15 +02:00
Vassil Vassilev
a67f06645e operator() doesn't have a name. 2014-08-29 15:31:05 +02:00
Vassil Vassilev
0aa2a31fa0 llvm::OwningPtr is now std::unique_ptr. 2014-08-14 14:56:44 +02:00
Vassil Vassilev
db33d58960 Add missing includes. 2014-08-14 14:56:34 +02:00
Vassil Vassilev
79b26d8878 ExprResult::take -> ExprResult::get, ExprResult::takeAs -> ExprResult::getAs. 2014-08-14 14:56:33 +02:00
Philippe Canal
576ca3ca96 Remove trailing spaces 2014-08-13 16:08:36 +02:00
Philippe Canal
f7aaac2c07 Avoid the risk of type creation if we can 2014-05-14 09:03:56 +02:00
Philippe Canal
d1e545b60d In Partial desugar add support for array type 2014-05-14 09:03:56 +02:00
Axel Naumann
5a63dff8e9 Survive lookup in a forward declared context. 2014-04-29 17:47:58 +02:00
Axel Naumann
8b60eaf361 Survive and signal non-unique lookup results. 2014-04-29 17:47:58 +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
Vassil Vassilev
bf57dc0424 Move isOnScopeChains to a common ground. Erase the decl from the resolver chain only if it existed there. 2014-02-12 15:30:59 +01:00
Philippe Canal
c6501ffe97 Introduce Transform::Config::DropDefaultArg
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)
2014-02-01 03:18:02 +01:00
Philippe Canal
1004034c75 Move IsStdClass to cling::utils::Analyze 2014-02-01 03:18:02 +01:00
Philippe Canal
0208d472dd Check that we found '::std' rather than some other namepace named std 2014-01-20 16:33:12 +01:00
Philippe Canal
8b1fd832dc Strip inline namespace 2014-01-20 16:33:11 +01:00
Axel Naumann
0236fc8c04 Make sure the prefix is a class (ROOT-5856). 2014-01-20 14:42:58 +01:00
Axel Naumann
44481ace1e Fix license; remove $Id$ version. 2014-01-07 11:14:04 +01:00
Axel Naumann
c73e6eb493 Re-implement (explicitly) handling of typedefs as nested name specs: TD::A.
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
2014-01-06 18:27:00 +01:00
Axel Naumann
4d98a76dec Support FullyQualName for ::B, fixes roottest/cling/op/ConversionOp. 2013-12-21 15:11:50 +01:00
Axel Naumann
0f3b2ba7f9 Remove now unused function. 2013-12-20 16:50:52 +01:00
Axel Naumann
db0fb9d2c4 Fatally misspelled function name: not type but namespace (ROOT-5867). 2013-12-20 15:22:49 +01:00
Philippe Canal
6850b1db86 Add IsStdOrCompilerDetails 2013-12-17 15:58:55 +01:00
Philippe Canal
3216896e6e Declare local function static (For consistency) 2013-12-17 15:58:54 +01:00
Philippe Canal
453513639f Correct comment (see 5e2960275c7e) 2013-12-17 15:58:54 +01:00