Commit Graph

143 Commits

Author SHA1 Message Date
Axel Naumann
ba4cc7641e Add test for ROOT-10221. 2019-07-16 00:14:07 +02:00
Axel Naumann
be780f4812 Fix initialization of array, fixes test. 2019-07-15 21:14:05 +02:00
Axel Naumann
4fef27091e Add storage to test types, to trigger dtor call. 2019-07-15 17:29:08 +02:00
Vassil Vassilev
daeaa6d9fb Fix failing test. 2019-03-17 08:15:02 +01:00
Vassil Vassilev
0b9abc1e14 Force flush cout after execution
The user might use utilities which print on cout and expects the output
to be shown immediately.

This patch automatically flushes std::cout after each execution of a wrapper.
2019-03-16 14:29:29 +01:00
Axel Naumann
5e0ff39cd8 Test printValue on unutterable types. 2018-06-27 08:45:21 +02:00
Axel Naumann
855d7224ae cling can now print lamda-dependent types! 2018-04-30 16:29:42 +02:00
Axel Naumann
e39e1baf94 Do not rely on value printer to side-#include <string>. 2018-04-30 16:29:42 +02:00
Vassil Vassilev
c2ce10091f Fix the expected fully qualified type. 2018-04-21 16:14:23 +02:00
Vassil Vassilev
4a226ee47a Desugar auto types allowing to print the full qualification of a type. 2018-04-19 17:59:08 +02:00
Vassil Vassilev
7b70052776 Add forgotten to commit protection and check clause.
This should have landed in 7554be9571.
2018-03-10 10:29:05 +01:00
Vassil Vassilev
01dbb6d9d5 Use a stable way to determine the address of printed objects.
Using unary operator address of (eg. MyClass m; &m) takes into account
overloaded operators which may not give us the precide address of the
allocated storage.

This patch teaches cling to use std::addressof instead.
2018-03-08 22:44:16 +01:00
Axel Naumann
1ac9f65512 Update to new output format. Use CHECK-NEXT. 2017-12-05 15:40:37 +01:00
Axel Naumann
25849d68c4 Update ref to include <invalid memory address> 2017-12-05 15:40:37 +01:00
Axel Naumann
a662db9c4c Adapt to new=old value printer: "1.000000" for a double 1 instead of "1".
Revert "Adapt to format changes in floating point value printing."

This reverts commit a15ef54fb4c5152eeff740cc1f3be6249ede26e6.
2017-12-05 15:40:37 +01:00
Axel Naumann
315dfad70e Adapt to new default opt level.
As the default opt level decides which user-set opt levels cling will complain about, "control flow" changes were needed for the tests.
2017-11-07 19:44:33 +01:00
Axel Naumann
a9808afd40 Adapt to format changes in floating point value printing. 2017-11-07 19:44:33 +01:00
Vassil Vassilev
c912c9437d Switch back to O0.
We have a suboptimal behavior in the way cling optimizes code in O2 mode.
Disable it until the issue is understood and fixed.
2017-11-03 16:19:32 +01:00
Axel Naumann
9f6e4d0ba0 Add test for "Also recognize templates as identifier." 2017-09-13 18:38:18 +02:00
Roman Zulak
4a8d300bb1 When looking for the end of a block comment, really don’t bother with nesting. Finding the first end is good enough, the real parser can warn about any balancing issues. 2017-07-13 10:21:58 +02:00
Roman Zulak
6f5594ab4d Fix block comments greedily looking for the next asterisk. 2017-07-13 10:21:58 +02:00
Axel Naumann
6ec2c42b3c Reflect updated function name in error message. 2017-06-26 17:44:07 +02:00
Axel Naumann
bef7762723 Remove outdated comment.
clang does warn about backslash-followed-by-tab.
2017-06-23 15:14:10 +02:00
Frederich Munch
df4aea2fb0 Add continuation support for comma and backslash characters. 2017-06-23 15:14:10 +02:00
Roman Zulak
6a8632d451 Fix trying to destruct C structs after printing on prompt. Don't bother destructing C++ objects who have trivial destructors.
Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
2017-06-12 18:14:30 +02:00
Vassil Vassilev
8f257e74d3 Create a virtual file entry for each input line.
This is the only way not to confuse the diagnostics engine of upgraded clang.

Also, this gives us a few advantages:
  * We can compare more precisely the source locations of diagnostics;
  * We can merge the code completion code path which works with file entries;
  * We can rely better when specifying //expected-note-s in different files.
2017-06-08 10:29:13 +02:00
Axel Naumann
a3b7f8b2b5 Fix C comments with slash. By Roman Zulak! 2017-05-11 09:00:00 +02:00
Axel Naumann
c7fcec5a46 Typo causing unrelated failure. 2017-05-09 08:59:40 +02:00
Axel Naumann
52d32de70c Add tests for #pragma cling optimize and .O 2017-04-12 15:44:35 +02:00
Axel Naumann
b266e2e5fc Implement first ".trace" command. From Viktor Khristenko! 2017-04-04 15:14:05 +02:00
Frederich Munch
165e7ea0b5 Fix collection printing for pairs, recursion, and std::vector<bool>. 2017-03-24 14:59:07 +01:00
Axel Naumann
7c1fbfcf9f Require ">" after ".5" to accept it as redirection (ROOT-8696). 2017-03-22 21:14:29 +01:00
Axel Naumann
2785a7c105 Remove debug breakage. 2017-02-21 15:14:05 +01:00
Axel Naumann
9588c52a43 Make it actually fail. 2017-02-21 14:14:05 +01:00
Axel Naumann
1ea1ac2d44 Temporary breakage to debug cont integration. 2017-02-21 11:44:30 +01:00
Frederich Munch
15c1247a44 Windows: Fix byte dumping to non UTF-8 codepage and Strings.C test. 2017-02-17 15:14:06 +01:00
Frederich Munch
3bde3e4404 Windows: Trivial fix for initorder.C. 2017-02-17 15:14:06 +01:00
Frederich Munch
7bf90d02f3 Comment redirection test and restore its previous glory.
This reverts commit f1538c4f30.
2017-01-25 08:14:56 +01:00
Frederich Munch
7eea9235da Have Value::dump write unicode and strings with embedded data properly. 2017-01-18 15:59:12 +01:00
Frederich Munch
f39f1f7318 Fix C-string printing for safety, speed, and data loss. Prior behavior assumed both pointer and pointer+10000 were valid memory. Add override for const char arrays so that they can be printed faster. Make cling::printValue a lossless operation. Previously strings with non-ASCII printable chars were transformed into an invalid c-string and the data could not be used to recreate the string. 2017-01-18 15:59:11 +01:00
Frederich Munch
fb96f9c040 Support unicode std::strings. 2017-01-18 15:59:11 +01:00
Axel Naumann
f1538c4f30 Test for ROOT-8399. 2017-01-17 14:29:07 +01:00
Axel Naumann
b3c0b92872 Add test for ROOT-7354.
(cherry picked from commit 1cc79b53c9289cf7f5f63a96d98ed2da741af41a)
2017-01-17 08:59:30 +01:00
Axel Naumann
03c2b3ea09 Test ROOT-8529. 2017-01-13 11:59:10 +01:00
Axel Naumann
3e22e9e78e Move from KnownFail, now that it works! 2017-01-12 11:14:34 +01:00
Axel Naumann
478a2e8646 This is now passing, actually.
For some reason that was not visible before the change to the prompt diag suppression.
2017-01-12 11:14:34 +01:00
Frederich Munch
1aabc2dbe0 Add simple wrappers for buffered LLVM streams. Use them to control Value printing format. 2016-12-19 13:59:11 +01:00
Frederich Munch
4427d1a5c2 Have .> cmd expand env-vars. Fixes OutputRedirect test on Windows. 2016-12-14 09:29:10 +01:00
Frederich Munch
1bf0e16d7f Redirect to file properly when no space between > and filename. 2016-12-14 09:29:10 +01:00
Frederich Munch
e0ddb56b20 Fixes for output redirection.
Decouple redirection state from MetaProcessor and MaybeRedirectOutputRAII.
Only suspend redirection when writing to the prompt.
Allow user to redirect to files named 1, 2, &1, &2.
Allow stderr and stdout to be redirected to one another.
Don't create _IO_2_1_stdout_ file.
2016-12-14 09:29:10 +01:00