Commit Graph

60 Commits

Author SHA1 Message Date
Jonas Hahnfeld
25ebd992ac Update expected types in output checks 2023-12-11 08:59:21 +01:00
Jonas Hahnfeld
fc12e238fc Remove expected space before array brackets in tests 2023-12-11 08:59:21 +01:00
Javier Lopez-Gomez
2766ad8421 Add test against ROOT-6095 2022-02-03 09:29:03 +01:00
Axel Naumann
2b1af22926 In failed lookup, unload only decls produced, not existing fwd decl:
Before, pre-existing fwd decls of specializations got unloaded.

OTOH, any decl produced during (failed) template instantiation must
also be unloaded; see #6331. Those are easiest identified by unloading
the whole (failed) transaction.

```
error: no member named 'value' in 'std::__and_<std::is_copy_assignable<std::__cxx11::basic_string<char> >, std::is_copy_assignable<Inner<int> > >'
                       is_copy_assignable<_T2>>::value,
                       ~~~~~~~~~~~~~~~~~~~~~~~~~~^
```

which is due to the first decl being invalid (as `Inner<int>` does not have a deinition and a `static_assert` /usr/lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/type_traits:1093 being triggered), then not unloaded, and then picked up again where we *do* have the definition for `Inner<int>`.

Add test for templt spec lookup vs unloading.
2021-03-18 19:59:03 +01:00
Axel Naumann
b118f4dee3 Get rid of extra-complex built_cling:
that is anyway what we want to test, always.
And nothing seems to set the env var.
2021-02-25 20:44:18 +01:00
Axel Naumann
76fac41c28 test lookup of template function specialization (ROOT-9789). 2019-01-10 13:29:15 +01:00
Danilo Piparo
a9160b6374 Fix tag lookup test 2018-09-24 09:58:50 +02:00
Danilo Piparo
f2b6205182 Remove fatal typo in tag lookup tests 2018-09-24 09:13:47 +02:00
Danilo Piparo
333bf59b14 Fix Tag test: the test failed because of a typo
the tag called "E" was looked for but its name tested against the
string "N"
2018-09-22 09:59:07 +02:00
Danilo Piparo
4d3fa7427b Add test for the Tag lookup helpers. 2018-09-22 09:14:48 +02:00
Axel Naumann
c283f26a8a Fix test to check the right thing. 2017-06-26 17:44:07 +02:00
Vassil Vassilev
a1bd767b6b Adapt to interface changes due to upgrade to r302975. 2017-06-08 10:29:13 +02:00
Philippe Canal
f5c7037763 Fix ROOT-8739: Lookup of symbol inside of namespace shadowed by function (in another 'used' namespace).
This was happening when a namespace had the same as the function in a namespace that was 'used'.  Namely,
in the issue report it was the 'next' namespace and the function std::next.

This required the quick search function in LookupHelper.cxx to properly handle the return value of utils::Lookup::Named.
2017-04-07 21:14:06 +02:00
Philippe Canal
3a1db539f6 Revert "Fix ROOT-8739: Lookup of symbol inside of namespace shadowed by function (in another 'used' namespace)."
This reverts commit 0728f30ead6c1cca74bf31b93dc9a1cb616a3e35.
2017-04-07 20:44:04 +02:00
Philippe Canal
68283cac47 Fix ROOT-8739: Lookup of symbol inside of namespace shadowed by function (in another 'used' namespace).
This was happening when a namespace had the same as the function in a namespace that was 'used'.  Namely,
in the issue report it was the 'next' namespace and the function std::next.

This required the quick search function in LookupHelper.cxx to properly handle the return value of utils::Lookup::Named.
2017-04-07 20:29:17 +02:00
Frederich Munch
075f4ffa83 Add cling output streams to cling/Utils/Output.h 2016-12-19 13:59:11 +01:00
Frederich Munch
2bf05c5188 Fix extern "C" declarations not being called from .x command.
This handles top-level declarations only (i.e. not nested in namespaces).
2016-09-16 21:39:49 +02:00
Frederich Munch
be7769aa5d Remove .rawInput from a variety of tests to test unwrapped function input. 2016-09-05 12:44:13 +02:00
Frederich Munch
e3265d1d8c Add %built_cling substitution for lit so tests can be run from either the build or installations directories. 2016-08-12 14:14:06 +02:00
Philippe Canal
4ba468335e Adapt output to tweaked behavior 2015-09-29 19:18:04 +02:00
Boris Perovic
800c644352 Removed "VALID" after address output, fixes roottest. Various fixes based on comments after second round. 2015-08-18 18:08:20 +02:00
Boris Perovic
2d317b983d Fixes based on cling test suite ("make test"). 2015-08-18 18:08:20 +02:00
Axel Naumann
9c383fcef3 clang is built without rtti; no chance to find its typeinfo. 2015-02-11 10:57:39 +01:00
Vassil Vassilev
f8b513b63a Remove obsolete test. It meant to test autoloading based on ctags, which is gone now. 2014-09-28 22:45:04 +02:00
Vassil Vassilev
ba9ed46a99 Tweak test expectations to match the new pretty printing. 2014-08-14 14:56:34 +02:00
Philippe Canal
576ca3ca96 Remove trailing spaces 2014-08-13 16:08:36 +02:00
manasij7479
024b16df11 Init TagsExtension Module, for extending cling to provide interactive hints
AutoloadCallback: Implementing InterpreterCallbacks to attach the module to cling
   The main focus is on overriding LookupObject so that the information about
   lookup failures are obtained from clang.
   The type of the name is not taken into consideration for now.

TagManager: To manage and lookup information from various sorts of tag files.
   Currently a TagManager object is owned by the callback system.
   This may change in future.

Wrapper: As a base class for handling particular types of tagfiles.
   The TagManager maintains a container of Wrappers.

CtagsFileWrapper: Implementing a wrapper for ctags.
   This class is responsible for generating a tagfile from a given path or list of files.
   It also performs lookups in the file generated by it.

And a few simple file system utils to complement llvm::sys::fs and path utilities
2014-06-04 09:20:14 +02:00
Vassil Vassilev
73752eff5e Bring to more up-to-date an xfailure. 2014-05-23 12:36:01 +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
Vassil Vassilev
c65f5bbba6 Use proper regexp 2014-03-27 11:18:57 +01:00
Vassil Vassilev
9af7ee2640 Actual optional regex syntax. 2014-03-24 15:26:56 +01:00
Vassil Vassilev
80a0e1e56e C++11 noexcept op. 2014-03-24 14:25:58 +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
3daaffb035 Add missing header 2013-11-19 05:33:55 +01:00
Philippe Canal
c423ae3bc8 Add LookupHelper::findDataMember to retrive a field or variable. 2013-11-19 04:37:11 +01:00
Philippe Canal
388271f9e9 Add cling::LookupHelper::findFunctionTemplate
Given a context and a name (and a constness), return the corresponding
function template decl.
2013-11-13 19:46:00 +01:00
Philippe Canal
e0e2df65e5 Allow findAnyFunction to discover a template instance without any argument hints
This allows to find an existing function template instance even based on only
the template name (of course, in this case, no instantiation is done, only already
existing ones can be returned).

This allows add there same features to TListOfFunctions::FindObject and
TViewAllPublicFunctions::FindObject.
2013-11-13 19:45:59 +01:00
Philippe Canal
1b8795f0c3 In findFunction*, add template instantiation if needed.
Update the test accordingly.
2013-11-04 14:35:07 +01:00
Philippe Canal
66d3abc12c Add instantiation (if needed) to findAnyFunction 2013-11-04 14:35:06 +01:00
Philippe Canal
0adde75bd2 In findAnyFunction, properly handle the template case.
As the other findFunction*, findAnyFunction does not
(yet?) instantiate the function template if has not
yet been instantiated.

Also add test for findAnyFunction.
2013-11-04 14:35:06 +01:00
Vassil Vassilev
e43a6a6816 Fix broken by construction test. 2013-10-14 09:11:39 +02:00
Vassil Vassilev
069a9d76c1 Remove unnecessary files that used to 'steer' the testsuite. 2013-09-27 14:33:05 +02:00
Philippe Canal
467cb93b3e Add support for lookup function from QualType(s).
Add new overload for findFunctionProto and matchFunctionProto which rather than
taking the list of argument types as a StringRef, take it as a
const llvm::SmallVector<clang::QualType, 4>.  This avoids the (permanent)
allocations inside clang due to the Parsing of types.
2013-08-26 00:10:54 +02:00
Philippe Canal
39d8a3e8a6 Add matchFunctionProto returning the decl only in case of exact match.
The new call is:

const clang::FunctionDecl* matchFunctionProto(const clang::Decl* scopeDecl,
                                              llvm::StringRef funcName,
                                              llvm::StringRef funcProto,
                                              bool objectIsConst
                                              ) const;

and the function must match in name and prototype (including constness).
The only thing not checked is the actual declaration context.
2013-08-17 01:45:56 +02:00
Philippe Canal
31b60e0ab5 Add support for restricting the function search to const functions.
Add an optional argument objectIsConst to findFunctionArgs and
findFunctionProto:

   const clang::FunctionDecl* findFunctionProto(const clang::Decl* scopeDecl,
                                                llvm::StringRef funcName,
                                                llvm::StringRef funcProto,
                                                bool objectIsConst) const;

   const clang::FunctionDecl* findFunctionArgs(const clang::Decl* scopeDecl,
                                               llvm::StringRef funcName,
                                               llvm::StringRef funcArgs,
                                               bool objectIsConst) const;
2013-08-17 01:45:55 +02:00
Axel Naumann
70695fe2be Update to clang/llvm r179269 (llvm vendor branch r49215):
Parser::Scope versus Sema::DeclContext are now checked for cross-vailidity.
Emit the TU-transaction explicitly instead of relying on a first transaction.
The typename extraction now takes a stream instead of a string to write to.
The llvm::Linker has much reduced functionality; use llvm::sys::Path instead to find dynamic libraries.


git-svn-id: http://root.cern.ch/svn/root/trunk@49325 27541ba8-7e3a-0410-8455-c3a389f83636
2013-04-24 16:28:08 +00:00