Commit Graph

568 Commits

Author SHA1 Message Date
Frederich Munch
3a519fe9cd Windows: Get RunAgainstClangTestSuite.C working. 2016-12-12 12:44:10 +01:00
Frederich Munch
12ebdf3686 Change PCH test to generated C++14.
This allows the test to pass on VStudio 2015 and seems like a good thing
to test on other platforms.
2016-12-12 12:44:10 +01:00
Frederich Munch
bf3c8052d8 Windows: Fix various test failures. 2016-12-12 12:44:09 +01:00
Frederich Munch
705e2b2a7e Windows: Fix test failure because path has backslashes. 2016-12-12 12:44:09 +01:00
Frederich Munch
d4aed2527d Add CLING_EXPORT macro. 2016-12-12 12:44:09 +01:00
Frederich Munch
52cd30dbef Lit: Add setenv transformation to use export/set on Unix/Windows. 2016-12-12 12:44:09 +01:00
Frederich Munch
e8cade29c7 Lit: Quote paths for Windows. 2016-12-12 12:44:09 +01:00
Frederich Munch
e265a84fef Lit: Use proper Windows paths for easier copy/paste. 2016-12-12 12:44:09 +01:00
Frederich Munch
960f6e4be7 Lit: Propagate LIB & LIBPATH env-vars on Windows. 2016-12-12 12:44:09 +01:00
Frederich Munch
723bed09d5 Add preprocessor #if conditional support to InputValidator. 2016-12-12 12:29:38 +01:00
Frederich Munch
72c3eac1e1 Add block comment support to InputValidator. 2016-12-12 12:29:38 +01:00
Frederich Munch
4b6ae92419 Split getcwd tests into two files as Windows cannot pass one of the tests. 2016-12-06 20:44:05 +01:00
Frederich Munch
0a995d8b3d Revert "Simplify; make Windows compatible (cannot delete cwd)."
This reverts commit 2459221755.
2016-12-06 20:44:05 +01:00
Bertrand Bellenot
2459221755 Simplify; make Windows compatible (cannot delete cwd). 2016-12-06 16:14:25 +01:00
Axel Naumann
372c3243bf MacOS messes up unicode file names with old git. 2016-12-02 11:29:08 +01:00
Axel Naumann
cab3c10849 Revert "Fix UTF8 encoding for _42_Semmel_Knödel."
Makes the tests fail on Linux.
This reverts commit e666cfc7b0d141aff54e380c2f7f63e85ae23646.
2016-12-01 17:44:07 +01:00
Frederich Munch
c534930b64 Fix UTF8 encoding for _42_Semmel_Knödel. 2016-12-01 17:29:08 +01:00
Bertrand Bellenot
fdf057e19a Cannot use tick as quote on Windows.' 2016-11-30 11:14:29 +01:00
Bertrand Bellenot
f8f73fd444 On Windows we need -nostdinc as C and C++ header locations are identical. 2016-11-30 10:14:14 +01:00
Bertrand Bellenot
79d830c122 Test cannot succeed on Windows due to DLL / dyn linker behavior. 2016-11-30 10:14:14 +01:00
Bertrand Bellenot
1f6b27c24c Make non-windows selectable for tests. 2016-11-30 10:14:13 +01:00
Axel Naumann
5e14792560 Add test for ROOT-8467. 2016-11-28 17:44:15 +01:00
Roman Zulak
9157aad03e Fix printing of std::map broken in 1e004e9.
Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
2016-11-23 12:59:23 +01:00
Roman Zulak
1e004e9d3a Fix printing of collections. Make it impossible for a collection with 1 element to match the string of an empty collection. Avoid checking if comma needs to be added in loop. Make an empty tuple print same as empty collection: '{}'.
Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
2016-11-21 12:44:34 +01:00
Roman Zulak
c91e902f58 Windows: Fix print QualType's that can be severely hidden in layers of typedefs.
Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
2016-11-21 12:44:34 +01:00
Philippe Canal
39ea2ba5c2 Extent autoforwarding test with more include nesting case 2016-11-18 01:29:09 +01:00
Philippe Canal
d066ad6061 Add test of the case where the definition are indirectly included 2016-11-14 03:14:37 +01:00
Philippe Canal
1bd0822562 Test for ROOT-8443
Test clean-up of forward decl with or without template default parameter and user forward decl
also with or without template default parameter and located before or after the inclusion
of the annotated/dictionary forward decls.
2016-11-14 03:14:37 +01:00
Philippe Canal
6920d6d460 Add cling version of test for ROOT-7037 2016-11-14 03:14:37 +01:00
Roman Zulak
74cb06a22f Fixes issues where symbols can be improperly aligned for llvm::PointerIntPair Use std::pair instead of llvm::PointerIntPair.
Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
2016-10-19 13:54:07 +02:00
Roman Zulak
1dadbe2495 Refactor CheckABICompatibility into a more legible version. Standardize error message. Return whether the ABI matched or not.
Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
2016-10-18 17:53:21 +02:00
Vassil Vassilev
fbd110fc67 When deciding not to wrap add the last token ';' we advanced to.
This fixes Github issue 113, breaking Jupiter notebooks.
2016-10-16 11:39:16 +02:00
Axel Naumann
1ce8341b6d Add newline at end of file. 2016-09-27 10:29:55 +02: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
c6b24d764c Fix TransactionPool placement new and delete.
TransactionPool was using placement new and delete improperly which could lead to Transaction::~Transaction running twice.
Make Transaction constructor private to make sure TransactionPool has allocated all Transactions it contains.
Remove "*Very useful for debugging purposes" leak on every allocation.
2016-09-12 17:29:20 +02:00
Axel Naumann
b56389eebe Add test for ROOT-7610. 2016-09-06 10:14:21 +02:00
Axel Naumann
22925c8b0a Add test against ROOT-5248. 2016-09-05 12:59:28 +02:00
Axel Naumann
580f6bee47 Add test against ROOT-7857. 2016-09-05 12:59:28 +02:00
Axel Naumann
31486e784e Add test against ROOT-8300, fixed by wrapper improvements by Roman. 2016-09-05 12:59:28 +02:00
Frederich Munch
5bb4fc3e8d More complete function/class wrap detection.
Handle C++ class scoping for unwrapped function/method definitions.
Handle source that begins with a function/method that should't be wrapped and
is followed by statements that should be.
2016-09-05 12:44:13 +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
c86cd5bc6c Allow struct and class return types from function definitions. 2016-09-05 12:44:12 +02:00
Frederich Munch
1bb3b96d2f Don't wrap function, method, constructor, or destructor definitions. 2016-09-05 12:44:12 +02:00
Frederich Munch
4a45f0bc51 Fix x86 dependency in test/UnknownType.C 2016-09-05 08:29:46 +02:00
Frederich Munch
cb0e5cf94a Fix crash when first thing printed in a session is a function 2016-09-02 12:59:54 +02:00
Frederich Munch
415483c07e Gracefully handle unknown type expressions.
Prior behavior crashed, now an error printed.
Add test/Prompt/ValuePrinter//UnkownType.C.
2016-09-02 12:59:54 +02:00
Axel Naumann
d9760070f6 Fix and simplify.
The original implementation would have needed multiple calls to ChildMP.process() for the value printing to work.
2016-08-29 12:14:42 +02:00
Axel Naumann
a302f3c002 Do not violate contract of frozen parent. 2016-08-29 09:29:15 +02:00
Axel Naumann
f6bfab6b2a XFAIL until I understand the failure. 2016-08-26 17:14:22 +02:00
Roman Zulak
8688067f1c Changing output name call.C test.
Hopefully this removes intermittent test failures because of a race condition where
two tests were attempting to write to the same file.

Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
2016-08-21 10:29:24 +02:00
Frederich Munch
bbfd61d897 Share -v flag with clang, and use it during startup to log info about header search paths.
Also fix trying to report why compiler invocation failed when it was never attempted.
Add message about build being probably being configured incorrectly.

Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
2016-08-18 15:44:18 +02:00
Frederich Munch
5ee1cfb7c3 Refactor all argument parsing into InvocationOptions.cpp.
Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
2016-08-18 15:44:18 +02:00
Frederich Munch
2142853de6 Don't call clang::ApplyHeaderSearchOptions from Interpreter::AddIncludePaths.
Instead call it at the end of cling::createCI (that should probably change too).

clang::ApplyHeaderSearchOptions is a very heavy-weight function that does a lot
of work to determine and add system headers. More importantly it can also wind
up invalidating clangs internal cache making inclusion of files later impossible.

By using the lighter HeaderSearchOptions::AddSearchPath we not only avoid redoing
a lot of work that has been done, but can adjust the method in clang to avoid
cache invalidation so that calling Interpreter::AddIncludePath will actually
make the files in that path accessible to clang.

Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
2016-08-18 15:44:18 +02:00
Frederich Munch
4cdbc0461e Honor clangs -nostdinc++ and -nobuiltininc flags.
Rename AddHostCXXIncludes  to AddHostIncludes and delineate between -nostdinc++
and -nobuiltininc. When cling is invoked with -nobuiltininc, do not #include any runtime
files on startup.  Make ABI incompatability error consistent across platforms and add a test to verify behavior when this occurs.

More importantly this allow for easier debugging of Decl unloading as the amount of
declarations on startup is greatly reduced.

Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
2016-08-18 15:44:17 +02:00
Frederich Munch
109812d223 Fix crash from possible null return from getcwd. 2016-08-12 14:29:07 +02:00
Frederich Munch
bcb75e1476 Don't create a virtual file with a valid file name.
This fix allows running a file in the current working directory.
2016-08-12 14:29:07 +02:00
Frederich Munch
a7f5c1719e Set CLING_NOHISTORY when running tests. 2016-08-12 14:14:06 +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
Frederich Munch
a875004a73 Fix check-cling target, broken in commit b461173.
Signed-off-by: Bertrand Bellenot <bertrand.bellenot@cern.ch>
2016-08-11 10:59:21 +02:00
Bertrand Bellenot
3c3c027663 Keep the Cling copyright header 2016-08-08 11:29:09 +02:00
Bertrand Bellenot
b46117358a Use the same CMake cling test architecture than the clang tests 2016-08-08 11:14:16 +02:00
Axel Naumann
6b06b7344b The "." is needed for lit to parse the regex; require 5*hex. 2016-07-30 21:14:15 +02:00
Axel Naumann
be22fa6165 Fix spelling of CPP check. 2016-07-30 13:14:13 +02:00
Axel Naumann
214dcfc40f Do not require extra char after 6 hex-digit ptrs. 2016-07-30 13:14:13 +02:00
Axel Naumann
494733cef8 JIT exception support missing for powerpc64. 2016-07-30 00:43:09 +02:00
Axel Naumann
92716fcdc6 Do not expose x86 asm to Power8. 2016-07-30 00:14:22 +02:00
Frederich Munch
f59228426b Fix writing files to source directory, write to build directory instead. 2016-07-22 12:44:12 +02:00
Axel Naumann
d9eea3590b Add test for ROOT-8077. 2016-07-21 19:29:07 +02:00
Axel Naumann
d4e01536f8 Make it fail! 2016-07-21 17:44:08 +02:00
Axel Naumann
ffec1df67b Only refuse decl extraction if ill-formed; add test; move KnownFail out. 2016-07-21 15:59:24 +02:00
Axel Naumann
a26c3cf033 Try to fix test failure in Travis. 2016-07-14 14:14:15 +02:00
Axel Naumann
7e9a74f3e4 Remove remnants of llvm configure/make build system. 2016-07-13 17:16:13 +02:00
Axel Naumann
0ad3a09203 Cope with new diag notes 2016-07-12 10:44:20 +02:00
Vassil Vassilev
af2cded628 Add consistent to llvm and clang target name to run the testsuite. 2016-07-08 11:29:29 +02:00
Philippe Canal
a573e3340b Add test of null pointer checking in function template 2016-06-30 03:14:17 +02:00
Axel Naumann
f9a8254617 Work around ROOT-8240. 2016-06-27 09:59:08 +02:00
Axel Naumann
1514d41841 Missing decl of printf. 2016-06-27 08:44:24 +02:00
Axel Naumann
fcb6aafd9e Fix file name. 2016-06-27 00:14:05 +02:00
Axel Naumann
7e1ee6da3a Add test for ROOT-7858. 2016-06-26 20:29:05 +02:00
Axel Naumann
e65d942ffa Add test for ROOT-8036. 2016-06-26 20:14:04 +02:00
Axel Naumann
7b0276fcae Remove platform-specific code (fails on Darwin), just use cannotCallWithNull. 2016-06-17 15:14:08 +02:00
Axel Naumann
f2326da23d Remove XFAIL now that the JIT can handle exceptions (at least on darwin). 2016-06-15 15:10:51 +02:00
Axel Naumann
1091b41295 Port test/CodeUnloading to CMake. Less failures than before! 2016-06-15 14:14:34 +02:00
Axel Naumann
47a6a5f288 Add %llvmsrcdir replacement. Remove leading space (?!). 2016-06-15 14:14:34 +02:00
Axel Naumann
f32d1a9ec7 Simplify test - import of string literals is not supported. 2016-06-15 14:14:33 +02:00
Axel Naumann
752dcfbb54 Adapt test to new style of scope dumps 2016-06-15 14:14:33 +02:00
Axel Naumann
6d3070de94 No exceptions in the (old) JIT of cling on powerpc64 either. 2016-03-31 10:29:07 +02:00
Axel Naumann
6d5b15306b XFAIL should be "arm64,aarch64", not "arm". 2016-03-31 09:44:06 +02:00
Axel Naumann
ac05121825 The (old) llvm JIT in cling does not support exceptions on either ARM64 not AARCH64. 2016-03-31 09:44:06 +02:00
Axel Naumann
3c31044732 Do not rely on debug output. Fix code. 2016-03-30 12:44:14 +02:00
Axel Naumann
0d827a761a Add test for ROOT-7837. 2016-03-04 21:29:05 +01:00
Axel Naumann
21588e64c2 This test is a no-op in CMake - we need to fix that. 2016-02-05 16:14:04 +01:00
Axel Naumann
2b58f4ad21 Rename to match more generic content. 2016-02-05 11:59:04 +01:00
CristinaCristescu
2906250d08 Add lambda test for null deref. 2016-02-05 11:59:04 +01:00
Axel Naumann
a8dcd932fe Fix expected enum value printing (underlying type). 2016-02-04 18:14:08 +01:00
Danilo Piparo
c07e92e42d Add test for empty tuple. 2016-02-04 15:29:16 +01:00
Axel Naumann
8621eb091a Simplify regex; #includes; std::. 2016-02-02 20:59:04 +01:00
Danilo Piparo
90fe0e262e Add to cling value printing capabilities for std::tuple and std::pair. 2016-02-02 12:59:25 +01:00
Axel Naumann
5587ae57e6 Test for ROOT-7918. 2016-01-31 21:29:07 +01:00
Axel Naumann
ba2d25f20a No diags! Really do iter deref. User fwd decl. 2016-01-28 15:12:50 +01:00
CristinaCristescu
0329828fd8 Add tests for cling NullDeref.
If stmt testing and checking that the execution is stopped after
a null deref warning.
2016-01-28 15:12:50 +01:00
Axel Naumann
5fb064400f Add test for ROOT-7426. 2016-01-28 15:12:50 +01:00
Axel Naumann
fd8be83d46 Revert unintentional add. 2016-01-14 20:59:08 +01:00
Elisavet Sakellari
e6487af04a Forgot to remove commented code 2016-01-14 20:44:14 +01:00
Elisavet Sakellari
ef6320070f Additional minor changes 2016-01-14 20:44:14 +01:00
Elisavet Sakellari
01a4526fc6 Edited test for Multiple Interps, and added some fixes 2016-01-14 20:44:14 +01:00
Elisavet Sakellari
4ac0a10a3e Added test for MultipleInterpreters, and some changes. 2016-01-14 20:44:14 +01:00
Axel Naumann
abf65cb689 Typo. 2016-01-13 10:14:06 +01:00
Axel Naumann
62ea6ec80a Do not rely on init_list intricacies. 2016-01-13 09:59:04 +01:00
Axel Naumann
1044052eed Range-based for loop requires type for loop variable. 2016-01-13 09:59:04 +01:00
Axel Naumann
d60d4e76be Two missing CMake vars for lit.cfg. 2016-01-12 12:27:43 +01:00
Axel Naumann
5c22ebb509 Do not print invalid memory. 2016-01-04 17:44:24 +01:00
Axel Naumann
a4a3ebbb41 Fix expectation to match (correct) reality. 2016-01-02 20:48:01 +01:00
CristinaCristescu
b8d475fd0c Add invalid deref tests. 2015-12-18 12:44:09 +01:00
Axel Naumann
473e16a131 Remove non-existing "cling-headers" dependency. 2015-12-16 20:29:22 +01:00
CristinaCristescu
95e3dcf8ef Check for invalid pointer address access. 2015-12-15 20:24:16 +01:00
CristinaCristescu
982a3ae38b Enable the NullDeref Cling test for MethodCalls. 2015-12-15 20:24:16 +01:00
Philippe Canal
4ba468335e Adapt output to tweaked behavior 2015-09-29 19:18:04 +02:00
Axel Naumann
dec5717d4c Fix printing of false! (And add a test.) 2015-08-21 12:23:04 +02:00
Boris Perovic
f268b40976 Dtors.c cling test changed in order to avoid infinite loop when unloading "RuntimePrintValue.h". Should be looked into in the future. 2015-08-20 17:06:02 +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
Boris Perovic
c44940b223 New printValue() integration (printing unified through overloading of printValue() function and template resolution). Modified tests to conform to the new prints. 2015-08-17 18:45:03 +02:00
Axel Naumann
4b08f20793 Fix runtime / PCH incompatibility. 2015-06-26 14:44:19 +02:00
Elisavet Sakellari
bfa9947c5a Implement search path cling pragma / ROOT macros (ROOT-7269). 2015-06-04 16:40:08 +02:00
Axel Naumann
5cfdd233c2 Test for ROOT-7295. 2015-06-04 11:30:15 +02:00
Liza
99de1fe5c0 ROOT-7031 bug fix for illegal macros. 2015-05-21 20:24:10 +02:00
Axel Naumann
1508b73c7c Add test for ROOT-7310. 2015-05-13 12:12:00 +02:00
Axel Naumann
31a9d9d0b2 Make test more telling. 2015-04-04 20:51:20 +02:00
Axel Naumann
2b0371b779 Adapt expectation to reality. 2015-04-03 21:58:12 +02:00
Axel Naumann
104540e8af Test for ROOT-7163. 2015-04-01 12:09:20 +02:00
Axel Naumann
97b8a20df8 Also copy include/llvm-c headers; cling-test needs them. 2015-04-01 12:09:15 +02:00
Liza Sakellari
529b0aed53 Fixed parsing of '\'' at the prompt (ROOT-7159). 2015-03-31 16:47:10 +02:00
Liza Sakellari
4de2d7d77c Fixed Parser error when calling a macro with arguments. 2015-03-31 16:47:09 +02:00
Liza Sakellari
19ce2d03b6 Fixed bug "Parser error when calling a macro with arguments". 2015-03-31 16:47:09 +02:00
Pere Mato
d38891b490 Use the make variable TESTDIRS to select the test directories for cling-test 2015-03-30 22:53:10 +02:00
Pere Mato
20e2f24106 Fix for ROOT-7184 - CMake config issue when enabling cling tests 2015-03-13 18:31:50 +01:00
Axel Naumann
18d0c4e740 Test for ROOT-7113: pragma once on prompt. 2015-02-27 11:05:19 +01:00
Axel Naumann
ea39f4e821 Fatal line mess - extract decl out of #if. 2015-02-25 21:28:10 +01:00
Axel Naumann
9bef38e844 Test inline asm at least on linux. 2015-02-25 20:37:12 +01:00
Axel Naumann
18437175a8 Add test for ROOT-6531. 2015-02-22 00:09:36 +01:00
Axel Naumann
e582b93a16 No #include <new> in C mode; add basic C mode test (ROOT-7090). 2015-02-21 22:43:36 +01:00
Axel Naumann
69234ce153 Fix nullptr value printing (ROOT-7092). 2015-02-21 22:27:26 +01:00
Axel Naumann
c1cf9236c0 Also test error recovery from non-existing file. 2015-02-18 14:51:21 +01:00
Axel Naumann
1ffc20a6b2 Add a cling pragma handler. For now implement #pragma cling load(file)
Extremely handy for sources that require certain libraries to be loaded;
it's similar to MSVC's #pragma comment(lib"libToLink").
2015-02-18 14:51:21 +01:00
Axel Naumann
d9a804df73 OrcJIT emits only call dependencies. 2015-02-11 10:57:47 +01:00
Axel Naumann
ae0290a4fb Follow change in warning; add new warning. 2015-02-11 10:57:46 +01:00
Axel Naumann
020f962990 Follow interface change (unique_ptr). 2015-02-11 10:57:44 +01:00
Axel Naumann
2deb711ce1 Make test more readable. 2015-02-11 10:57:41 +01:00
Axel Naumann
9c383fcef3 clang is built without rtti; no chance to find its typeinfo. 2015-02-11 10:57:39 +01:00