Commit Graph

1183 Commits

Author SHA1 Message Date
Philippe Canal
576ca3ca96 Remove trailing spaces 2014-08-13 16:08:36 +02:00
Vassil Vassilev
90abfb5485 Fix doxygen. 2014-07-23 15:57:01 +02:00
Vassil Vassilev
643074f544 Remove a redundant member. 2014-07-22 15:48:02 +02:00
Vassil Vassilev
8fea4d6f75 Early exit if there is no Transaction. 2014-07-22 15:19:01 +02:00
Vassil Vassilev
f8d56d6833 Remove the assert, the use pattern of the interfaces is different. 2014-07-22 15:19:01 +02:00
manasij7479
662262e3ac Rename SetAutoloadCallback to EnableAutoloading 2014-07-22 14:52:04 +02:00
manasij7479
03e5ef7668 Prevent printing non-fixed enums Remove skipping of system headers Also, do not print default template arguments if they do not have a name. 2014-07-22 14:52:04 +02:00
manasij7479
a2a924a263 Display attribute only when class is fully defined 2014-07-22 14:52:03 +02:00
manasij7479
6e642eeea8 Added options for controlling Macro printing and skipping System Headers And other modifications in ForwardDeclPrinter: HasNestedNameSpecifier function is now disabled. Because it fails for typedefs or classes not having complete definitions. Differentiating between variable initializations and function default arguments. 2014-07-22 14:52:03 +02:00
manasij7479
a812b2cd1d Added a function to attach the AutoloadCallback automatically 2014-07-22 14:52:03 +02:00
manasij7479
6b48ac6804 Default argument stripping for FunctionDecl Also, re-enabled the printing of function default arguments in ForwardDeclPrinter 2014-07-22 14:52:02 +02:00
manasij7479
ab048fa2dd Move Autoloading State information from Interpreter to Callback: Also, use the TransactionCommitted callback instead of a transformation Disable AutoloadingTransform in IncrementalParser for now. 2014-07-22 14:52:02 +02:00
manasij7479
e7a196dcbd Transformation-Callback Pipeline for Decls needing special handling (when defining after being forward declared.)
New state in Interpreter (AutoloadingStateInfo) containing a map.
AutoloadingTransform adapted to push required decls into this map.
AutoloadCallback adapted to be called when a file is included (but before being parsed)
(done by enabling PPCallbacks and overriding InclusionDirective method)
m_PPCallbacks changed from OwningPtr to a normal pointer as an workaround for double free bug.
Default template arguments as a POC example usage of this pileline.

Test:
AutoForwarding.C now passes because of this commit.

Extra:
Re-enabled the printing of class template default arguments when generating fwd declarations.
Forward declprinter now looks up the SourceManager for file name instead of directly printing the Argument.
2014-07-22 14:52:02 +02:00
manasij7479
2e3e929a41 Skip functions and vars with nested types and new failing enum tests 2014-07-22 14:52:02 +02:00
manasij7479
064bc74add Operators skipped by string checking A lot of nested name specifiers were in operator arguments And operator declarations were not needed anyway. Check isOperator function of ForwardDeclPrinter 2014-07-22 14:52:01 +02:00
manasij7479
b71886acf3 Prevent the printing of extra semicolons 2014-07-22 14:52:01 +02:00
manasij7479
fac4708d54 Printing simple Macros enabled 2014-07-22 14:52:01 +02:00
Axel Naumann
08d752703f Improve SLoc and output for dynscope errors (more ROOT-6365). 2014-07-02 12:15:01 +02:00
Axel Naumann
0a93013a89 Use the SLoc of the original Expr for better readability (ROOT-6365). 2014-07-01 16:42:58 +02:00
Axel Naumann
b1e81bdcfd Handle failure in dynlookup more gracefully (ROOT-6365). 2014-07-01 16:42:58 +02:00
Manasij Mukherjee
f474d63079 Generation of forward declarations of top level decls in an input file.
Consists of:
  ForwardDeclPrinter, adapted from clang::DeclPrinter
  Interpterer::GenerateAutoloadingMap for invoking the functionality
  It has hardcoded checks to prevent ForwardDeclPrinter from visiting decls from
standard library files. This restriction will be lifted after the
issues specifyed in the tests are fixed.
  Test cases for code which FowrardDeclPrinter can not deal with properly
2014-06-23 14:37:03 +02:00
CristinaCristescu
aaff0628ca Value extraction checking for deleted copy ctor (ROOT-6385).
During the value extraction the copy constructor availability check must ensure the copy ctor was not deleted.
2014-06-17 14:41:28 +02:00
Axel Naumann
a6bb239088 Try to fix const-cast warning. 2014-06-15 10:04:02 +02:00
CristinaCristescu
4cf130675f Fix const array of char*. (ROOT-5607). 2014-06-14 09:53:03 +02:00
CristinaCristescu
8702488331 Stream array elements need deferencing only not all streams of ptr. 2014-06-14 09:53:03 +02:00
CristinaCristescu
e36c4e937e Print an element of type ptr within an array. (ROOT-5607). 2014-06-14 09:53:02 +02:00
Axel Naumann
cea02a82e7 From Vassil: substitute then / else (ROOT-6345).
VisitCompoundStmt correctly substitutes the child Stmts. When calling Visit()
on a Stmt, this substitution needs to be carried out by the caller: only
it knows what target type to request. This fixes the issue for if statements
which do not fall back to VisitStmt() because of the conditional being of bool
type. In principle we are still missing do / while statements, too - again due
to the conditional part.
2014-06-13 11:11:57 +02:00
Vassil Vassilev
a57c866b3d Silence a warning. 2014-06-13 09:19:57 +02:00
Vassil Vassilev
bcc98f7101 Put AutoloadingVisitor.cpp in cmake. 2014-06-10 16:34:59 +02:00
manasij7479
f9f829c48e autoloading visitor 2014-06-10 15:24:01 +02:00
manasij7479
983abbe17b split out failing stl test 2014-06-10 15:24:01 +02:00
manasij7479
297d005617 other fixes 2014-06-10 15:24:01 +02:00
manasij7479
db964bfcfc purged ctags code and moved autoloading into interpreter 2014-06-10 15:24:01 +02:00
Vassil Vassilev
f5250400d4 Remove the junk I accidentally committed. 2014-06-05 17:38:59 +02:00
Vassil Vassilev
2c16f39465 Align up the comment properly. 2014-06-04 12:12:14 +02:00
Vassil Vassilev
21d9481ce0 Clang diagnostics cause havoc, disable until understood. 2014-06-04 12:06:03 +02:00
manasij7479
ebc1309b5f initial code for new approach
(cherry picked from commit fa2b32bd9281f61fd36ff1987041a9a7607ab5e7)
2014-06-04 10:06:03 +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
86c66f2b73 Remove useless error msg. 2014-06-04 09:20:09 +02:00
Vassil Vassilev
213141cb5c Use the more user-friendly clang diagnostics engine to produce execution errors. 2014-06-04 09:20:09 +02:00
Philippe Canal
63de420f9c Add missing transaction in Interpreter::StateDebuggerRAII::~StateDebuggerRAII
This prevents .printDebug from crashing.  However it is still more verbose
than expected.
2014-05-29 18:02:55 +02:00
Philippe Canal
0df6d7ee38 Add missing transaction in Interpreter::StateDebuggerRAII::StateDebuggerRAII
This prevents .printDebug from crashing.  However it is still more verbose
than expected.
2014-05-29 17:33:59 +02:00
Axel Naumann
b91c987027 Fix value printing for functions. Needs test! 2014-05-28 18:09:57 +02:00
Vassil Vassilev
e173faa960 If we don't have the information about the type of the RHS report an and exit. 2014-05-28 12:11:57 +02:00
Axel Naumann
a9ad9a8c02 Wrap using decl/def that are followed by code (ROOT-6153). 2014-05-27 12:17:12 +02:00
CristinaCristescu
5d4115482f Value extraction: not a record decl we have copy ctor by default. 2014-05-26 18:30:58 +02:00
CristinaCristescu
832390bc7b Correct line alignment. 2014-05-26 18:30:58 +02:00
CristinaCristescu
980133d65e Value extraction setting void types.
In the case the type is void we have to reset the maybe different object type pushed on the stack before the assesment of the desugared type.
2014-05-26 18:30:57 +02:00
CristinaCristescu
d85eba73ee Default cling::Value set to invalid.
The cling::Value is initialized to be invalid then the value extraction changes it or not. If we do not have an available copy constructor for objects the value stays invalid.
2014-05-26 18:30:57 +02:00
CristinaCristescu
e41ba01959 ValueExtractionSynthesizer: check for the existance and accessibility of copy constructor. (ROOT-6185). 2014-05-26 18:30:56 +02:00