1524 Commits

Author SHA1 Message Date
Axel Naumann
7f02f830c9 80col, spaces. 2013-12-05 16:27:01 +01:00
Axel Naumann
a1e922c839 Remove stray ; 2013-12-04 20:37:59 +01:00
Axel Naumann
0eb9ac042f Make full qualification an option.
Allows GetPartiallyDesugaredType() and GetFullyQualifiedName() to share functionality.
2013-12-04 19:09:59 +01:00
Axel Naumann
97987030f5 Move several TypeName functions from MetaUtils to cling/Utils.
They were once identical but then got bug fixed out of sync.
Moved routines:

GetFullyQualifiedLocalType()
GetFullyQualifiedType()
CreateNestedNameSpecifier()
CreateNestedNameSpecifierForScopeOf()
GetFullyQualifiedTypeNNS()
2013-12-04 19:09:59 +01:00
Bertrand Bellenot
c2e1c33726 Make ROOT working on cygwin again
Check for correct library files format on cygwin (fix loading libraries issue)
2013-12-04 16:01:04 +01:00
Bertrand Bellenot
96ed0c5f54 Implement several missing functions (for Windows) in DynamicLibraryManager and fix a couple of compilation errors on Windows 2013-12-04 11:03:08 +01:00
Bertrand Bellenot
90b6fa02dd Revert commit f3f6ca0fa133e2a09ec38af455624af6a5c9521d (changes will be made in root instead) 2013-12-04 10:56:24 +01:00
Axel Naumann
63e094c197 Do not diagnose lookup problems in lookup() interfaces. 2013-12-02 14:21:08 +01:00
Axel Naumann
67f5e5bf64 Add option to disable rollback. Handle missing ExecEngine. 2013-12-02 13:53:30 +01:00
Axel Naumann
7106f6546d Protect against Null type. 2013-12-02 13:53:30 +01:00
Bertrand Bellenot
f3f6ca0fa1 Implement several missing functions (for Windows) in DynamicLibraryManager and fix a couple of compilation errors on Windows 2013-11-29 11:04:07 +01:00
Vassil Vassilev
bf98f9426c Move the execution engine cleanup upfront.
The EE cleanup needs to mangle the name in order to clean it up from the module.
The mangler iterates over the redecl chain, which is a problem because if we
exclude the decl from the redecl chain first we end up in infinite loop.
2013-11-27 15:46:59 +01:00
Vassil Vassilev
e1f1007e10 Remove the reset of the expelled decl. 2013-11-27 15:46:59 +01:00
Vassil Vassilev
26290c9b4c On teardown we delete the transactions in the pool, too. 2013-11-27 15:46:59 +01:00
Vassil Vassilev
3242fa7d30 When we unload we have to cleanup the containers. 2013-11-27 15:46:59 +01:00
Vassil Vassilev
846058e9c0 Nested transactions can be in rolled back state when deleting. 2013-11-27 15:46:59 +01:00
Vassil Vassilev
41d0b39f51 Revert the macros just once. 2013-11-27 13:19:00 +01:00
Vassil Vassilev
8518cb9e81 We don't need to iterate over the deserialized macro for the sanity check. 2013-11-27 13:19:00 +01:00
Vassil Vassilev
fadb9b124a Set previous decl of the detached decl to point to the valid head of the new redecl chain. 2013-11-27 13:19:00 +01:00
Fons Rademakers
523b65eb7b Make sure _LIBCPP_EXTERN_TEMPLATE is not defined (used by libc++).
The default definition of this macro causes extern template
symbols to be undefined when running with cling. It has been fixed in
the meanwhile in the libc++ sources but the libc++ that ships with OSX 10.9
still has this macro defined. For the discussion on this see:
http://clang-developers.42468.n3.nabble.com/LIBCPP-INLINE-VISIBILITY-and-std-string-length-td4030879.html
and
http://www.mail-archive.com/cfe-commits@cs.uiuc.edu/msg79202.html
2013-11-27 12:49:00 +01:00
CristinaCristescu
149380f3d5 Fix assert macros ASTNodeEraser. 2013-11-26 18:26:57 +01:00
CristinaCristescu
49a39b3deb Fix warnings from Macros. 2013-11-26 15:18:57 +01:00
Vassil Vassilev
d86f4a94aa Remove redundant code. 2013-11-25 17:39:01 +01:00
Vassil Vassilev
d74740df1d Size doesn't make sense for a transaction. Iteration doesn't cause side effects anymore. 2013-11-25 17:32:56 +01:00
Vassil Vassilev
d00d9c01c1 Silence an init order warning. 2013-11-25 16:49:56 +01:00
Vassil Vassilev
99e19e1399 Add the change in the PreProcessor as a patch. 2013-11-25 16:15:57 +01:00
Vassil Vassilev
16b82159ea Revert the unintentional change in test. 2013-11-25 13:56:03 +01:00
Vassil Vassilev
03b8166617 Invert the assert condition. 2013-11-25 13:56:03 +01:00
Vassil Vassilev
41b685f2f1 Add clarification comment. 2013-11-25 13:56:02 +01:00
Vassil Vassilev
b2da538302 When non default memory buffer is provided add a common include file.
When a CI is created with a custom membory buffer, we can just set it as the
main memory buffer, becuase when clang tries to compare the include chains it
won't find common predecessor and either will infinite-loop or crash.
2013-11-25 13:56:02 +01:00
Vassil Vassilev
26b0a13f81 Use the correct interface to check for emptiness. 2013-11-25 13:56:02 +01:00
Vassil Vassilev
47df4b334b Comment 2013-11-25 13:56:02 +01:00
Vassil Vassilev
a0912520ee Reduce the hacky-ness of the state collector setup.
The second compilerInstance doesn't need to collect anything, thus we don't
need to attach it to the PP.
2013-11-25 13:56:02 +01:00
CristinaCristescu
1d06b2725b Workaround multiple DeclCollector instances. 2013-11-25 13:56:02 +01:00
CristinaCristescu
d6e2f85d1c Fix and improve macro error recovery. 2013-11-25 13:56:02 +01:00
CristinaCristescu
5d42bd5e8c Improvements on Macro removal. 2013-11-25 13:56:02 +01:00
CristinaCristescu
5eb9f3ee5c Fix mangler and cache. 2013-11-25 13:56:01 +01:00
CristinaCristescu
46f07198b0 Add comments and fix trailing spaces. 2013-11-25 13:56:01 +01:00
CristinaCristescu
ed1f6779c2 Remove the macros from the Macros map in the Preprocessor when reverting transaction. 2013-11-25 13:56:01 +01:00
CristinaCristescu
ab014ac72b Print macro to ostream instead of llvm::errs(). 2013-11-25 13:56:01 +01:00
CristinaCristescu
4a8b33b878 ErrorRecovery test. 2013-11-25 13:56:01 +01:00
CristinaCristescu
85b4232729 Revert macro def for error recovery. 2013-11-25 13:56:01 +01:00
CristinaCristescu
8d88a849be Print the macro in .compareState. 2013-11-25 13:56:01 +01:00
CristinaCristescu
0490caaa99 Macro recovery 2013-11-25 13:56:00 +01:00
Philippe Canal
9d4823f471 Prevent function from being return as a data members.
FunctionDecl are ValueDecl and are found by lookup.
2013-11-22 20:15:59 +01:00
Axel Naumann
6e4f9cc679 From Vassil and me: move RAII out of ParseWithShortcuts().
The RAII destructs TemplateIdAnnotations that are still needed by the caller, as pointed out by valgrind:
==4595== Invalid read of size 4
==4595==    at 0x1C88E9A: clang::Sema::DecomposeUnqualifiedId(clang::UnqualifiedId const&, clang::TemplateArgumentListInfo&, clang::DeclarationNameInfo&, clang::TemplateArgumentListInfo const*&) (SemaExpr.cpp:1635)
==4595==    by 0x147FF03: clang::FunctionDecl const* cling::findFunction<clang::FunctionDecl const*>(clang::DeclContext*, clang::CXXScopeSpec&, llvm::StringRef, llvm::SmallVector<clang::Expr*, 4u> const&, bool, clang::ASTContext&, clang::Parser&, clang::Sema&, clang::FunctionDecl const* (*)(clang::DeclContext*, bool, llvm::SmallVector<clang::Expr*, 4u> const&, clang::LookupResult&, clang::DeclarationNameInfo&, clang::TemplateArgumentListInfo const*, clang::ASTContext&, clang::Parser&, clang::Sema&)) (LookupHelper.cpp:819)
==4595==    by 0x147DE1A: cling::LookupHelper::findFunctionArgs(clang::Decl const*, llvm::StringRef, llvm::StringRef, bool) const (LookupHelper.cpp:1374)
==4595==  Address 0x8013e74 is 68 bytes inside a block of size 136 free'd
==4595==    at 0x402B77D: free (vg_replace_malloc.c:468)
==4595==    by 0x1484A11: clang::TemplateIdAnnotation::Destroy() (ParsedTemplate.h:205)
==4595==    by 0x1484979: clang::DestroyTemplateIdAnnotationsRAIIObj::~DestroyTemplateIdAnnotationsRAIIObj() (RAIIObjectsForParser.h:446)
==4595==    by 0x1484914: clang::DestroyTemplateIdAnnotationsRAIIObj::~DestroyTemplateIdAnnotationsRAIIObj() (RAIIObjectsForParser.h:442)
==4595==    by 0x14848F8: cling::ParserStateRAII::~ParserStateRAII() (LookupHelper.cpp:67)
==4595==    by 0x147F284: cling::ParserStateRAII::~ParserStateRAII() (LookupHelper.cpp:54)
==4595==    by 0x147EDB1: cling::ParseWithShortcuts(clang::DeclContext*, clang::CXXScopeSpec&, llvm::StringRef, clang::Parser&, clang::Sema&, clang::UnqualifiedId&) (LookupHelper.cpp:765)
==4595==    by 0x147FE5A: clang::FunctionDecl const* cling::findFunction<clang::FunctionDecl const*>(clang::DeclContext*, clang::CXXScopeSpec&, llvm::StringRef, llvm::SmallVector<clang::Expr*, 4u> const&, bool, clang::ASTContext&, clang::Parser&, clang::Sema&, clang::FunctionDecl const* (*)(clang::DeclContext*, bool, llvm::SmallVector<clang::Expr*, 4u> const&, clang::LookupResult&, clang::DeclarationNameInfo&, clang::TemplateArgumentListInfo const*, clang::ASTContext&, clang::Parser&, clang::Sema&)) (LookupHelper.cpp:801)
==4595==    by 0x147DE1A: cling::LookupHelper::findFunctionArgs(clang::Decl const*, llvm::StringRef, llvm::StringRef, bool) const (LookupHelper.cpp:1374)
2013-11-22 16:24:55 +01:00
Vassil Vassilev
4e19547a50 The static consts end up in the lib's datasection, we need to force generation of the symbol. 2013-11-22 09:27:05 +01:00
Vassil Vassilev
82bd4d7952 Blanks 2013-11-22 09:27:05 +01:00
Philippe Canal
bf982c59e4 Avoid reading past the end of a static buffer.
llvm::sys::fs::identify_magic takes a StringRef which
was automatically created from a the char[1024] buffer.
To create the StringRef automatically requires a call to
strlen but in this case the buffer is by definition not
null terminated.  We could either null terminate or better
yet just construct explicit the 'right' StringRef.
2013-11-21 18:11:02 +01:00
Philippe Canal
0476b4d4dc Move '-Wno-ambiguous-member-template' from cling to CallFunc 2013-11-20 21:40:00 +01:00