Commit Graph

878 Commits

Author SHA1 Message Date
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
f127f8797f Add missing operators in ParseWithShortcuts. 2013-08-28 17:48:53 +02:00
Vassil Vassilev
a6f245a8b4 Don't play smart* use proper empty str as default arg. 2013-08-28 16:44:01 +02:00
Vassil Vassilev
eaadf9d492 Finally fix that infinite const recursion. 2013-08-28 16:44:01 +02:00
Vassil Vassilev
59ced3f193 Move codegenning of deserialized declarations in the IncrementalParser.
We had two different codepath for codegeneration. The first one was for
declarations that came from text and the second one for declarations that came
from 'ExternalSource' such as PCH. In the latter case we had to do some
extra equilibristics to emulate a PCM and ignore generating code for decls with
static storage, because it will clash with the loading of the library that already
contains them.

The advantage of the new implementation is that instead of communicating the
deserialized decls to ROOT via some fishy deserialization listeners we can use
the cling::Transaction as we use it for decls that came from code.
2013-08-28 16:44:01 +02:00
Vassil Vassilev
2e97001848 Print the decls coming from deserialization, too. 2013-08-28 16:44:01 +02:00
Vassil Vassilev
53d4cbc184 There is no need of checking the size of the transaction. 2013-08-28 16:44:00 +02:00
Vassil Vassilev
2b67326e17 Fix getters, ending up in infinite recursion... 2013-08-28 16:44:00 +02:00
Vassil Vassilev
d7c785b0b2 Implement pretty print of DelayCallInfo. Constify. 2013-08-28 16:44:00 +02:00
Vassil Vassilev
8d3f2089b2 Order. 2013-08-28 16:44:00 +02:00
Vassil Vassilev
476e36c348 Add another sanity check. It will cry whenever we extend the enum. 2013-08-28 16:44:00 +02:00
Vassil Vassilev
110fa5a460 Iterating over the AST might trigger deserialization. 2013-08-28 16:43:59 +02:00
Vassil Vassilev
f043c36192 Constify. 2013-08-28 16:43:59 +02:00
Vassil Vassilev
0ed039355a The ASTContext is a ref. 2013-08-28 16:43:58 +02:00
Vassil Vassilev
c3f2c31583 Use the ASTContext stored in the Transaction. 2013-08-28 16:43:58 +02:00
Vassil Vassilev
94853302a7 Forward to the const getter. 2013-08-28 16:43:58 +02:00
Axel Naumann
c822c7c81d UserInterface must be compiled with -fexceptions. 2013-08-28 09:39:53 +02:00
Paul Russo
63cb406f2f Add support for TClingCallFunc function wrappers to transactions. 2013-08-28 03:46:06 +02:00
Paul Russo
7fa8507477 Support returning values of arbitrary class type.
This restriction prevents us from evaluating function argument
expressions of class type (by value), and prevents us from
returning values with a class type (by value), if that class
has a non-trivial constructor or copy constructor.

For now we will allow the StoredValue to do a bit copy, with
the expectation that in the future StoredValue will hold
values of class type by pointer or reference instead of making
a copy.
2013-08-28 03:46:06 +02:00
Paul Russo
b4e6d23d4c Add support for member data pointer type.
Given:

class A {
private:
   int fInt;
};

We need to support storing the return value of
a function like this:

int A::*
f()
{
   return &A::fInt;
}
2013-08-28 03:46:06 +02:00
Vassil Vassilev
7179804c46 Move the handling of unhandled exceptions in the loop.
Indeed if the UserInterface.cpp is compiled without -fno-exceptions I get:
****************** CLING ******************
* Type C++ code and press enter to run it *
*             Type .q to exit             *
*******************************************
[cling]$ throw 12;
Exception occurred. Recovering...
[cling]$ .q

So the issue is still in the build system, because I built UserInterface.cpp 'by hand'.
2013-08-27 23:46:41 +02:00
Vassil Vassilev
dc47e5f3b5 The standard said use catch(...) and not catch() 2013-08-27 23:42:03 +02:00
Vassil Vassilev
77b0bb0a30 Try to handle exceptions coming from the JIT.
The idea is whenever there is an exception cling to be able to recover from it
and continue working. For example:
[cling] throw 12;
shouldn't crash the current session in the interpreter. Now that we have compiled
the UserInterface with exceptions on, I hoped to be able to catch exceptions
coming from the JIT easily, but obviously I am still missing something.
2013-08-27 23:05:53 +02:00
Baozeng Ding
69c20e16b9 Make shouldProceed C++ function. 2013-08-27 22:18:54 +02:00
Axel Naumann
1430c5ee35 Remove debug output 2013-08-26 18:17:55 +02:00
Axel Naumann
107c073d58 Allow the UserInterface to use exceptions. 2013-08-26 17:26:53 +02:00
Axel Naumann
be70c52ce7 This patch affects files in llvm, not clang. 2013-08-26 12:07:52 +02:00
Axel Naumann
1e2f3a7a23 Adjust patch paths. 2013-08-26 12:07:52 +02:00
Philippe Canal
0fb9bb08f7 Removed unused variable 2013-08-26 00:50:52 +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
7312683eda Allocate Expr on a custom address to be able to release memory.
We now use operator new with placement to memory explicit
allocated in the routine (rather than the ASTContext) so
that we can release this memory at the end of the function.
The memory is allocated via a vector of object large enough
to hold the OpaqueExprRef.
2013-08-26 00:10:54 +02:00
Philippe Canal
dfc4b7b1c1 Remove unused variable 2013-08-26 00:10:54 +02:00
Bertrand Bellenot
3575eb44f1 Check if fileName *starts* with /usr/ 2013-08-24 16:00:56 +02:00
Vassil Vassilev
c6e144f046 Fix param name. 2013-08-23 21:44:53 +02:00
Baozeng Ding
3f256225e9 Iterate over the redecl chain to find the non null attribute. 2013-08-23 21:44:53 +02:00
Bertrand Bellenot
9daf1d7571 List loaded header and source files with the .files command
List the loaded source files when typing .files on the command line, including the system headers, but whithout the ones in /usr/..../bit/
2013-08-23 16:49:54 +02:00
Vassil Vassilev
277988492f Commit forgotten file. Documentation improvements. 2013-08-22 16:02:53 +02:00
Vassil Vassilev
aa5240d5b9 Fix init order warning. 2013-08-22 15:43:55 +02:00
Vassil Vassilev
67b9ac4784 Use better method name. Improve documentation. 2013-08-22 15:43:55 +02:00
Vassil Vassilev
36b6e36b1a Move the PPCallbacks in InterpreterCallbacks too. 2013-08-22 13:50:57 +02:00
Vassil Vassilev
2445d8b5fe Fix typo. 2013-08-22 13:50:57 +02:00
Vassil Vassilev
c2a0b5cece For now we will only work/check on declarations that are not deserialized.
We don't want our null deref checker to deserialize the whole PCH/PCM. We should
come up with an idea to work around it.
2013-08-22 13:50:56 +02:00
Vassil Vassilev
85179e69e3 Subscribe to the interesting events. 2013-08-22 13:50:56 +02:00
Vassil Vassilev
8c168320f0 Hide the callback adaptor classes in the implementation. 2013-08-22 13:50:56 +02:00
Vassil Vassilev
c8f4ac8beb Remove private ctor. 2013-08-22 13:50:54 +02:00
Vassil Vassilev
1c04a16ae6 Hide InterpreterExternalSemaSource class as an implementation detail. 2013-08-22 13:50:54 +02:00
Axel Naumann
cd85c7e8d3 Get the file patch right. 2013-08-21 16:43:33 +02:00
Axel Naumann
955c7befdf Remove non-llvm patch parts; fix paths 2013-08-21 15:28:52 +02:00
Vassil Vassilev
6527a15123 We don't need the the members and the accessors. 2013-08-21 14:29:58 +02:00
Jerome Beclin
162101dd9d Instrument the error recovery testsuite with .store- and .compare- State.
Add a special lit substitution giving us the executed test folder, so that
before next run we could cleanup.
2013-08-21 14:29:57 +02:00