2646 Commits

Author SHA1 Message Date
Frederich Munch
08178f1a46 Fix Windows exception handling for newer LLVM interfaces. Block it’s usage around CLING_WIN_SEH_EXCEPTIONS macro. 2017-07-05 09:14:09 +02:00
Bertrand Bellenot
071bf231b7 Fromm Frederich Munch: Fix CxxStdCompiledWith for Visual Studio, which requires C++14 2017-07-04 17:00:34 +02:00
Frederich Munch
329de59275 Windows: Fix infinite loop when piping to cling with < operator. 2017-07-04 15:36:52 +02:00
Frederich Munch
aad084a75a UserInterface: cling is discarding the last line if it does not have a newline. 2017-07-04 15:29:09 +02:00
Frederich Munch
22d5d1c1d2 Windows: Visual Studio 2017 is still returning 199711L for __cplusplus! 2017-07-04 15:29:09 +02:00
Axel Naumann
b675d42b6f Support shebang even outside cling driver, e.g. #!/usr/bin/env root -l -b. 2017-07-04 13:44:22 +02:00
Axel Naumann
4259fa5c74 Missing newline (breaking echo.C?) 2017-07-03 22:29:13 +02:00
Axel Naumann
609b88eabd Mark intentional fall-throughs (Coverity). 2017-07-03 14:47:57 +02:00
Axel Naumann
702dc6e269 Also escape array subscript (ROOT-7718). 2017-07-03 14:47:57 +02:00
Raphael Isemann
777650d799 Allow setting a custom ASTConsumer in CIFactory (NFC).
So far we create our DeclCollector in the CIFactory and then tried to
get this variable back in the IncrementalParser by casting the
ASTConsumer of our compiler instance to a DeclCollector. This strategy
fails as soon as we want to have multiple collectors and start using
the clang multiplexer as this call will now fail (e.g. in this case to
have another ASTConsumer that looks in the C++ modules case for what
libraries we need to link - and the best way to add this is via
the multiplexed ASTConsumer that clang provides).

This patch moves the responsibility for the DeclCollector to the
caller that relies on getting a DeclCollector back, which is in this
case the constructor of IncrementalParser.
2017-06-30 10:30:35 +02:00
Raphael Isemann
3c745639bb Always generate a ROOT modulemap and install it.
To use C++ modules during runtime we need to generate a modulemap
and install it alongside the ROOT headers. However, right now
we need to turn on cxxmodules to generate a modulemap, which would
force experiments to fulfill all the depndencies that cxxmodules
brings with it (that is, a modern clang that can build ROOT with C++
modules).

This patch untangles the modulemap generation from the cxxmodules
option, so that we always generate a modulemap even when cxxmodules
is turned off. We now also install the modulemap alongside
the ROOT headers.

No functional change for normal ROOT expected here, as the modulemap
will just be ignored without having runtime C++ modules enabled.
2017-06-29 20:51:50 +02:00
Axel Naumann
2b2f6f27db 80 cols [NFC]. 2017-06-28 17:14:08 +02:00
Axel Naumann
7aff792c8e #warning is compile-time :-) 2017-06-28 17:14:08 +02:00
Frederich Munch
c4a1d433bb Set __CLING__CXX14 for consitancy. 2017-06-28 16:15:10 +02:00
Frederich Munch
ac8fb31f82 Remove outdated comments. 2017-06-28 16:15:10 +02:00
Frederich Munch
e90cfd8b4f Make sure to setup the language defaults normally when outputting a PCH. 2017-06-28 16:15:10 +02:00
Frederich Munch
4739761b89 Don’t clear GNUMode when user has specifically asked for it. There are uses that are valid even if the host compiled with _GLIBCXX_USE_FLOAT128. 2017-06-28 16:15:10 +02:00
Axel Naumann
3918184d11 StartModule(), makeModuleName() do not need to be public. 2017-06-28 14:08:13 +02:00
Frederich Munch
f63f9bb61d Remove dependency on sstream and iostream. 2017-06-28 14:08:13 +02:00
Frederich Munch
c0ccc621da Refactor common code for creating modules in IncrementalParser. 2017-06-28 14:08:13 +02:00
Axel Naumann
3693489f3d Handle also nested deduced templates, even those wrapped in a LocInfoType.
Fixes cling/test/Lookup/template.C in C++17.
2017-06-27 10:31:08 +02:00
Frederich Munch
8e41533e0a Remove extra semicolon. 2017-06-27 10:14:05 +02:00
Axel Naumann
8fae026045 Missing "}"! 2017-06-26 22:15:16 +02:00
Axel Naumann
6ec06c0bd6 Use proper interface. 2017-06-26 22:00:28 +02:00
Axel Naumann
8e0dc09857 Turn gnu++ off if __float128 is unsupported in clang:
// clang currently supports native __float128 only on few targets, and
      // this target does not have it. The most visible consequence of this is a
      // specialization
      //    __is_floating_point_helper<__float128>
      // in include/c++/6.3.0/type_traits:344 that clang then rejects. The
      // specialization is protected by !if _GLIBCXX_USE_FLOAT128 (which is
      // unconditionally set in c++config.h) and #if !__STRICT_ANSI__. Tweak the
      // latter by disabling GNUMode.
2017-06-26 20:59:35 +02:00
Axel Naumann
07f42c7a51 Fist step towards fixing cling/test/Lookup/template.C for C++17. 2017-06-26 17:44:07 +02:00
Axel Naumann
c904524faa Back out __float128 change until we know why it's happening.
Travis should be able to reproduce this, which should allow us to report it upstream.
2017-06-23 17:14:12 +02:00
Frederich Munch
a48a2803be Add CxxStdCompiledWith function that will error if C++ standard is unknown. Fix __float128 error for gcc with -std=c++1z. 2017-06-23 17:14:12 +02:00
Axel Naumann
dc04fb555c Show diagnostics of possible value print errors. 2017-06-23 17:14:12 +02:00
Axel Naumann
27aea4b5a0 Use proper function name. 2017-06-23 17:14:12 +02:00
Axel Naumann
640eb1d81d Debug Travis GCC builds on MacOS - do they really pass -std=gnu++17?! 2017-06-23 16:44:06 +02:00
Frederich Munch
df4aea2fb0 Add continuation support for comma and backslash characters. 2017-06-23 15:14:10 +02:00
Frederich Munch
499b522de5 Initialize Token fields on construction. 2017-06-23 15:14:10 +02:00
Axel Naumann
1b2a853b7d Initialize pointer array (FWIW). Thanks, Coverity! 2017-06-23 12:59:10 +02:00
Axel Naumann
0b3c8e3acd Fix clang warning "suggest braces around init of subobject". 2017-06-23 12:59:10 +02:00
Bertrand Bellenot
5665358dff Add missing semicolon (Windows) 2017-06-23 11:14:04 +02:00
Axel Naumann
aae2870f62 Allow getStringType() to reset the cache. 2017-06-23 10:59:10 +02:00
Frederich Munch
522b5f491c Add support for multiple arguments in one pragma call. Add support for multiple styles: 2017-06-23 10:44:12 +02:00
Frederich Munch
f0caa519e8 Save some memory and only create one ClingPragmaHandler to handle all pragmas. Use clang diagnostics for parsing errors. 2017-06-23 10:44:11 +02:00
Frederich Munch
955b5423e4 Make sure to declare gCling in C-mode. Skip failing test in AtExit.C. 2017-06-22 20:30:27 +02:00
Axel Naumann
deb1fcbc7d Only emit definitions if !SyntaxOnly.
Fixes duplicate definition errors with PCH, where the first definition is in the PCH, and the
second one is injected at runtime, after attaching the PCH.
This patch still exposes as many declarations as possible to fSyntaxOnly to validate their syntax.
2017-06-22 16:39:14 +02:00
Frederich Munch
8f29132120 Fix -fsyntax-only flag which changed in 0d15357 and to allow usage of gCling.
0d15357 unintentionally blocked inclusion of RuntimeUniverse.h when using -fsyntax-only.
2017-06-22 16:39:14 +02:00
Frederich Munch
f1071b4f86 Only set -std=c++11 on Apple/GCC if language has not been explicitly set. 2017-06-22 16:39:14 +02:00
Axel Naumann
65b4cd2cc3 Avoid memset by using in-class member init. 2017-06-22 13:10:37 +02:00
Frederich Munch
7504234e21 Cache all string types. 2017-06-22 13:10:37 +02:00
Frederich Munch
8fab0d5be8 Fix caching of std::string type.
If the Transaction that holds std::string type is unloaded LookupHelper::m_StringTy will point to invalid memory.
LookupHelper::findType can return an invalid QualType causing dereference of null.
2017-06-22 13:10:37 +02:00
Frederich Munch
6753263bf4 Refactor specializations of executePrintValue. Having ExecutePrintValue templated codegens duplicate functions unneccessarily. Removes re-direction, duplicate signatures, and line count for executePrintValue. 2017-06-21 12:59:08 +02:00
Frederich Munch
c11b3fdecc Enclose more stuff in anonymous namespaces. 2017-06-21 12:59:08 +02:00
Frederich Munch
38c757e36d Have MetaProcessor::process take an llvm::StringRef. Remove unnecessary std::string -> const char* -> std::string conversions. 2017-06-21 11:29:07 +02:00
Frederich Munch
14d88d2d86 Move wchar_t type branching out of runtime. 2017-06-21 08:29:11 +02:00