435 Commits

Author SHA1 Message Date
Vassil Vassilev
7238b2eb7b Autoloading is enabled by default. 2014-08-14 14:56:42 +02:00
manasij7479
7b99ddcfa1 Skip decls using names from defs like typedef struct {} structName 2014-08-14 14:56:40 +02:00
Vassil Vassilev
dd554c2d6e Use #include instead of real files.
If we use real files cling would .x them and run a function named after the file.
In our case it is missing and would issue useless warnings.
2014-08-14 14:56:40 +02:00
Vassil Vassilev
8a8651a8d0 Implement diagnostic report in missing .x function to call. 2014-08-14 14:56:40 +02:00
Vassil Vassilev
5d6297b821 Adapt to the new invocation. 2014-08-14 14:56:40 +02:00
Vassil Vassilev
7ecb829baa Move the test at its right place 2014-08-14 14:56:40 +02:00
Vassil Vassilev
c51df6e215 The invocation changed, follow the changes. 2014-08-14 14:56:40 +02:00
Vassil Vassilev
e0874ff6a4 Improve the STL test. Now we can reenable it. 2014-08-14 14:56:39 +02:00
Vassil Vassilev
a1640388a4 On .x try calling the specially named function only if it exists. 2014-08-14 14:56:39 +02:00
manasij7479
38b773ad3e Simple test for Standard Library headers, and a few more workarounds 2014-08-14 14:56:38 +02:00
Vassil Vassilev
a3058bf045 Disable #inclusion of the generated fwd decl headers. 2014-08-14 14:56:38 +02:00
Vassil Vassilev
14fecdd942 Try #include the generated files by separate instance. 2014-08-14 14:56:38 +02:00
Vassil Vassilev
ac4ab27781 Reduce the iteration to only STL (at least on Ubu is the first include path.) 2014-08-14 14:56:37 +02:00
Vassil Vassilev
bacc8b6f08 Remove debug printout. Run in verify mode. 2014-08-14 14:56:37 +02:00
Vassil Vassilev
0065df1842 Test the fwd decl generator with all headers in the include path. 2014-08-14 14:56:37 +02:00
Vassil Vassilev
03f4edd3c1 Do not print the inherited default arguments. 2014-08-14 14:56:36 +02:00
Vassil Vassilev
f65296420e Put back the XFAIL. 2014-08-14 14:56:35 +02:00
Vassil Vassilev
53d7da9b75 No need of undo anymore. 2014-08-14 14:56:35 +02:00
Vassil Vassilev
d8f6659dcc Improve support for enum redeclaration. 2014-08-14 14:56:35 +02:00
Vassil Vassilev
ba9ed46a99 Tweak test expectations to match the new pretty printing. 2014-08-14 14:56:34 +02:00
Axel Naumann
11d315a22b Also print structs; add test. 2014-08-14 14:19:03 +02:00
Philippe Canal
576ca3ca96 Remove trailing spaces 2014-08-13 16:08:36 +02:00
Vassil Vassilev
a833661f08 Fix failing test. 2014-07-25 13:18: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
a812b2cd1d Added a function to attach the AutoloadCallback automatically 2014-07-22 14:52:03 +02:00
manasij7479
083ab88d81 Modified test to include a function with a default arg 2014-07-22 14:52:03 +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
Axel Naumann
41d9497052 Test that #pragma diagnoistics does not cause problems. 2014-07-01 14:44:04 +02:00
Vassil Vassilev
1fd7010509 Remove the XFAIL, the test doesn't fail anymore. 2014-06-24 11:26:57 +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
Vassil Vassilev
de2d2ee714 Adapt tests for the newly produced diagnostics. 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
236172318f removed ctags tests 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
manasij7479
46d8d76d80 modified tests
(cherry picked from commit 77316a2838c5037feff8091bb5c0919bc59d6b16)
2014-06-04 10:06:03 +02:00
manasij7479
0a0da4f26d enum test for template
(cherry picked from commit ce717aac63c7bd29e836106e255df98b23c4fdb3)
2014-06-04 10:06:02 +02:00
manasij7479
c7e56b7ea1 enum test for C++11 enum class, does not have C enums yet
(cherry picked from commit 9b7d0c5260f79b321b8b21b3c19da3e8c507aa11)
2014-06-04 10:06:01 +02:00
manasij7479
cee01f1a13 added a function and a trait util from stl
(cherry picked from commit 2ea8127e629ee26a48bbaeda8da935dbe04d7ebe)
2014-06-04 10:06:00 +02:00
manasij7479
58a58d2ed1 added some stl forward decls
(cherry picked from commit 365737c218defce09bbceca2119f396236564c99)
2014-06-04 10:06:00 +02:00
manasij7479
01a4bf5e5b Initial tests for verifying forward declarations
(cherry picked from commit c9b5a07d5cd83100862e067ccff189e10c666f9b)
2014-06-04 10:06:00 +02:00
Vassil Vassilev
56b5dc86dd Obey coding rules and indentation. 2014-06-04 09:20:15 +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
Axel Naumann
b91c987027 Fix value printing for functions. Needs test! 2014-05-28 18:09:57 +02:00
Axel Naumann
39ed28c03e Void has no address. 2014-05-26 17:37:57 +02:00
Vassil Vassilev
6e9cd68cb2 Construct a library call example. The full reflection-based call still to come. 2014-05-23 12:36:01 +02:00
Vassil Vassilev
6d8b154f7f Fix broken by constrution test. 2014-05-23 12:36:01 +02:00
Vassil Vassilev
73752eff5e Bring to more up-to-date an xfailure. 2014-05-23 12:36:01 +02:00