Commit Graph

2066 Commits

Author SHA1 Message Date
Timur Pocheptsov
dc65a8f2c4 Remove explicit name qualification and replace it with "nice" using directive at the beginning of implementation file.
git-svn-id: http://root.cern.ch/svn/root/trunk@47714 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-29 19:42:43 +00:00
Timur Pocheptsov
46a3404e6f 2 spaces instead of 3 in indents.
git-svn-id: http://root.cern.ch/svn/root/trunk@47713 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-29 19:35:33 +00:00
Timur Pocheptsov
7af5326d79 Do not attempt to calculate the size for a partial template specialization class.
git-svn-id: http://root.cern.ch/svn/root/trunk@47687 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-28 19:50:50 +00:00
Timur Pocheptsov
208c024a5d 1. Remove <iostream>.
2. '_' can also be a part of identifier.


git-svn-id: http://root.cern.ch/svn/root/trunk@47686 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-28 19:37:36 +00:00
Timur Pocheptsov
d61e44e47d Clang dies in EmptySubobjectMap::ComputeEmptySubobjectSizes(), one of bases for some weird class is not of
RecordType.


git-svn-id: http://root.cern.ch/svn/root/trunk@47685 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-28 19:15:10 +00:00
Paul Russo
6f5a94816f Backout revision 47672 because it breaks dictionaries.
git-svn-id: http://root.cern.ch/svn/root/trunk@47680 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-28 17:18:16 +00:00
Timur Pocheptsov
10b8039f2f Replace hand-made BaseName with llvm::sys::path::filename.
git-svn-id: http://root.cern.ch/svn/root/trunk@47679 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-28 17:13:31 +00:00
Timur Pocheptsov
4e1cc75fda Remove TCintDisplayClass from the core/meta, fix MetaProcessor.cpp (wrong include path)
git-svn-id: http://root.cern.ch/svn/root/trunk@47677 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-28 16:50:13 +00:00
Philippe Canal
5d382a09f0 remove un-intentional commit of old code
git-svn-id: http://root.cern.ch/svn/root/trunk@47676 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-28 16:46:34 +00:00
Timur Pocheptsov
f474053b85 1. Remove all ROOT specific code from the TCintDisplayXXX and move this "display" into the MetaProcessor.
2. Mods in CommandLexer to support .! .g .class in a MetaProcessor.


git-svn-id: http://root.cern.ch/svn/root/trunk@47674 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-28 16:38:02 +00:00
Paul Russo
6827ff1446 Fix from Philippe to enable Transform::GetPartiallyDesugaredType()
to actually desugar while looking for typedefs to keep.


git-svn-id: http://root.cern.ch/svn/root/trunk@47672 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-28 16:14:29 +00:00
Vassil Vassilev
27bfa0f1cc Silence another warning.
git-svn-id: http://root.cern.ch/svn/root/trunk@47655 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-27 16:23:22 +00:00
Vassil Vassilev
b497a0b37a Silence a warning.
git-svn-id: http://root.cern.ch/svn/root/trunk@47654 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-27 15:56:52 +00:00
Philippe Canal
63ea4e20db avoid crashing when seeing module 'import' thingies
git-svn-id: http://root.cern.ch/svn/root/trunk@47653 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-27 15:54:36 +00:00
Vassil Vassilev
b66d4750fd Handle properly ticks and quotes.
I know that the lexers are getting too many and soon I will merge both implementations
into one full-blown.
Reduces the test failures a lot.


git-svn-id: http://root.cern.ch/svn/root/trunk@47652 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-27 15:41:08 +00:00
Vassil Vassilev
1015181bd2 Insert an actual new line, which means new line for the lexer too...
git-svn-id: http://root.cern.ch/svn/root/trunk@47630 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-26 14:09:43 +00:00
Vassil Vassilev
a86f9fcff7 My bad that shouldn't ended up in the trunk at all
git-svn-id: http://root.cern.ch/svn/root/trunk@47629 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-26 14:08:10 +00:00
Vassil Vassilev
55e9e20bf8 Silence a warning.
git-svn-id: http://root.cern.ch/svn/root/trunk@47626 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-26 13:45:32 +00:00
Vassil Vassilev
cc112e3dc7 Remove unused include.
git-svn-id: http://root.cern.ch/svn/root/trunk@47618 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-24 22:31:41 +00:00
Axel Naumann
6d87784d2a Add missing second half of r47590
git-svn-id: http://root.cern.ch/svn/root/trunk@47592 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-23 08:30:04 +00:00
Vassil Vassilev
a28cd2e9ab Remove a declaration only from its lexical declaration context.
Don't erase the decl from the vector of decls, because the vector is generated
from the declaration context from which we have already deleted the decl.


git-svn-id: http://root.cern.ch/svn/root/trunk@47591 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-23 08:05:40 +00:00
Vassil Vassilev
046ac9440e When we cannot copy the result we shouldn't try. Fixes savannah bug #99000
git-svn-id: http://root.cern.ch/svn/root/trunk@47590 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-22 22:23:17 +00:00
Vassil Vassilev
6ff2764fc1 Teach the input validator to handle imbalance of ' or ".
Add constness to the reference.
Improve style.


git-svn-id: http://root.cern.ch/svn/root/trunk@47587 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-22 17:58:59 +00:00
Vassil Vassilev
e02c6a1da8 Update the patch corresponding to the latest change in the vendor drop.
git-svn-id: http://root.cern.ch/svn/root/trunk@47561 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-21 20:25:46 +00:00
Vassil Vassilev
0b9ac8557b Factor out the creation on IntegerLiteral in separate public routine.
git-svn-id: http://root.cern.ch/svn/root/trunk@47542 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-21 17:05:10 +00:00
Axel Naumann
010b391174 Warning comparison (un)signed.
git-svn-id: http://root.cern.ch/svn/root/trunk@47526 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-21 10:51:41 +00:00
Vassil Vassilev
512d1bbf21 Add interface in cling::Interpreter that avoids lexing, parsing and sematic
analysis. It just takes the transaction runs all the transformers on it 
(depending on the compilation options residing in the transaction itself) and
generate code for it.


git-svn-id: http://root.cern.ch/svn/root/trunk@47518 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-21 02:28:31 +00:00
Vassil Vassilev
4008ac3681 Add convenient interface that allow us to add easily single decl in a transaction.
git-svn-id: http://root.cern.ch/svn/root/trunk@47517 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-21 02:26:05 +00:00
Vassil Vassilev
8cf9ab9121 Add test case for an item on my TODO list.
git-svn-id: http://root.cern.ch/svn/root/trunk@47516 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-21 01:15:58 +00:00
Philippe Canal
65e877ce0f Properly handle (ignore) outer scope that are not namespace or TagDecl
git-svn-id: http://root.cern.ch/svn/root/trunk@47513 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-20 23:19:48 +00:00
Axel Naumann
a68395dc86 Also set the name of the currently executing file for readInputFromFile.
Refuse to readInputFromFile if the file is binary, as determined by llvm::sys::IdentifyFileType or wild guessing based on the fraction of non-printables in the first 1k (max) bytes.
Prevents root -l libRooFit.so
Now that we identify the file we could even link the library in - but that's for later.


git-svn-id: http://root.cern.ch/svn/root/trunk@47500 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-20 20:21:29 +00:00
Axel Naumann
3df2500a81 Be nice to the caller - lookup inside a DeclContext should work even for a const DeclContext, so do a const_cast in the source.
git-svn-id: http://root.cern.ch/svn/root/trunk@47496 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-20 19:13:06 +00:00
Axel Naumann
2da8caecff Handle unresolved symbols in static initialization.
Now that it's used twice, extract the conversion from ExeContext::ExeResult to Interp::ExeResult.
IncrementalParser will try to roll the transaction back for unresolved initializers.


git-svn-id: http://root.cern.ch/svn/root/trunk@47484 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-20 16:24:02 +00:00
Axel Naumann
c197c04fb6 DiagConsumer::Begin/EndSourceFile() are used to switch from "parsing command line flags" to "parsing source files" more; not to signal a new source file to the diag client.
Switch BeginSourceFile() on after having parsed Interpreter internals.
Switch it off (EndSourceFile()) in ~Interpreter.
Indentation.

Now that we handle diags appropriately, test/ErrorRecovery/MetaProcessor.C fails; repair it.


git-svn-id: http://root.cern.ch/svn/root/trunk@47476 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-20 13:21:00 +00:00
Vassil Vassilev
1901c83a0e Fix warning in EC.
git-svn-id: http://root.cern.ch/svn/root/trunk@47475 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-20 13:20:22 +00:00
Axel Naumann
d465d934a5 Simplify the RAII:
when constructing it takes a snapshot of whatever is relevant.
when destructing it restores whatever is relevant.

Don't mess with the diag Begin/EndSourceFile(); that's only relevant on a frontend level (aka are we parsing command line flgs or already source files?)


git-svn-id: http://root.cern.ch/svn/root/trunk@47474 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-20 13:17:55 +00:00
Axel Naumann
546c2b1e61 When parsing .x/.L filename() //comment
* empty argument is not an error.
* pass comment to interpreter whether .x was successful or not; it might be an expected-diagnostic
Thus implement comment lexer.


git-svn-id: http://root.cern.ch/svn/root/trunk@47473 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-20 13:15:25 +00:00
Axel Naumann
83f7b6c23d Say who is complaining.
git-svn-id: http://root.cern.ch/svn/root/trunk@47470 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-20 10:10:57 +00:00
Axel Naumann
afcf1105c9 Having warnings does not mean failure.
git-svn-id: http://root.cern.ch/svn/root/trunk@47469 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-20 09:43:17 +00:00
Vassil Vassilev
009338beb7 Since cling::Transaction is public and the fact that on commit of transaction a
new transaction could be triggered, every compile should return the transaction
that it actually compiled. I.e. the cling::IncrementalParser::getLastTransaction
in many cases might not be the transaction we expect. For example in ROOT's case
plugin manager is triggered for some reason and the last transaction is not the
one that I'd personally expect.
This should be fix roottest/.../runMemory.C


git-svn-id: http://root.cern.ch/svn/root/trunk@47465 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-20 03:26:52 +00:00
Vassil Vassilev
e49c5fb31e If the first decl happens to be null ask the wrapper function for the ASTContext.
git-svn-id: http://root.cern.ch/svn/root/trunk@47459 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-19 21:17:28 +00:00
Axel Naumann
1546d01ca3 Make test more verbose; fix directory for library.
git-svn-id: http://root.cern.ch/svn/root/trunk@47430 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-19 10:59:40 +00:00
Axel Naumann
26f3d7cf75 Do cling's best at returning the currently executing file.
#included files will not be picked up as cling cannot tell where the currently running function was defined.
But it does know which file was passed to MetaProcessor::executeFunction() (e.g. via .x).
So at least store that.
This fixes the occurrences of GetCurrentMacroName() in tutorials/


git-svn-id: http://root.cern.ch/svn/root/trunk@47421 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-19 00:00:53 +00:00
Vassil Vassilev
177d20e14c Fix code generation of dynamic classes, i.e classes having virtual tables.
git-svn-id: http://root.cern.ch/svn/root/trunk@47418 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-18 22:57:52 +00:00
Vassil Vassilev
9fce4384b9 Add test exposing the problem with the partial code generation.
git-svn-id: http://root.cern.ch/svn/root/trunk@47417 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-18 22:56:46 +00:00
Vassil Vassilev
3a684ca4d6 HandleVTable assert is far too intrusive to stay.
git-svn-id: http://root.cern.ch/svn/root/trunk@47416 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-18 22:44:58 +00:00
Vassil Vassilev
9b1a7efe4b Indents
git-svn-id: http://root.cern.ch/svn/root/trunk@47415 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-18 22:27:00 +00:00
Vassil Vassilev
991d6c55c8 Assert actually on use of one of those routines in Sema.
git-svn-id: http://root.cern.ch/svn/root/trunk@47411 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-18 20:52:41 +00:00
Vassil Vassilev
6c4ae5b1dd Add non const iterator.
git-svn-id: http://root.cern.ch/svn/root/trunk@47407 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-18 15:46:16 +00:00
Axel Naumann
10c0ac8711 Don't free all JITted functions, only those that are referencing an unresolved symbol.
Thus also no need anymore to collect all jitted functions through a function JIT listener.
Sadly, recompilation of them will pick up the existing stub instead of actually recompiling.
Don't use StringRef.data() where we need a 0-terminated string for FindFunctionNamed().
Be explicit about what symbol is triggering an unresolved symbol.
Update test suite.


git-svn-id: http://root.cern.ch/svn/root/trunk@47398 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-17 16:28:14 +00:00