Commit Graph

2633 Commits

Author SHA1 Message Date
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
Frederich Munch
f241b59b68 Remove unnecessary include. 2017-06-21 08:29:11 +02:00
Frederich Munch
e8e203bc98 Add __CLING__GNUC_MINOR__ macro. 2017-06-21 08:29:10 +02:00
Frederich Munch
95c67cb818 Cleanup cruft from CreateHostTargetMachine. 2017-06-20 11:44:13 +02:00
Axel Naumann
2177d1d4e5 Rename cling_Evaluate to EvaluateDynamicExpression.
"cling" is already in the namespace, and this is about DynamicExprInfo.
Thanks to Roman Zulak for the suggestion!
2017-06-19 16:00:56 +02:00
Vassil Vassilev
01d6baa5a9 Silence unused var warning. 2017-06-14 18:29:10 +02:00
Frederich Munch
f84742e218 Fix buffer overflow. 2017-06-14 17:59:39 +02:00
Axel Naumann
2faf5c2400 Make sure we use the definition as lookup scope. 2017-06-14 09:30:01 +02:00
Axel Naumann
212ad1b7d1 Outline calls to Interpreter::Evaluate() to not #include "Interpreter.h" in the runtime. 2017-06-14 09:30:00 +02:00
Raphael Isemann
8bdca9bc29 Fixed formatting. 2017-06-13 14:30:47 +02:00
Raphael Isemann
ca887faea0 Fix Interpreter::getMacro returning 0 when using modules.
The old code didn't query the modules if the identifier
is updated. This caused some checks to fail such as
CheckABICompatibility().
2017-06-13 14:30:47 +02:00
Raphael Isemann
55702c056b Don't overwrite the ExternalSemaSource in the modules case. (#538)
The modules implementation provides it's own sema source and
overwriting this confuses clang when we have -fmodules enabled.
2017-06-13 14:30:47 +02:00
Roman Zulak
2806ec0f61 Warn if lambdas in global scope use copy capture.
Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
2017-06-12 18:14:31 +02:00
Roman Zulak
6a8632d451 Fix trying to destruct C structs after printing on prompt. Don't bother destructing C++ objects who have trivial destructors.
Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
2017-06-12 18:14:30 +02:00