IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
The overload taking a path opens the file and then mmap its contents.
This can cause bus errors when another process truncates the file
while we are trying to read it. Instead just read the first 1024 bytes,
which should be enough for identify_magic to do its work.
Including that header from cling breaks building ROOT with
external llvm and clang (which is needed e.g. for the conda
package): `config.h` is not avaiable in that scenario.
This commit builds on previous work for getting GDB support for JITted
and interpreted code working in cling. It adds a JIT event listener as
well to create perf map files to allow profiling of interpreted/JITted
code with cling.
The functionality provided is disabled by default. The interface to
enable it has been chosen to be via environment variables to allow both
interpreted code in the prompt as well as linked code to be able to
optionally enable debugging/profiling. Using ld.so as example, where
LD_DEBUG and LD_PROFILE exist, we chose CLING_DEBUG and CLING_PROFILE
to enable these features. For the moment, setting these variables to
anything enables the feature. Later on, if support for oprofile is
added, for example, it may be better to enable specific JIT event
listeners depending on the value of the variables, for example with
CLING_PROFILE=perf or CLING_PROFILE=oprofile, respectively.
The crash occurs due to a missing guard that prevents `libcudart.so` from being
loaded. Loading a library requires an executor which is not available in
syntax-only mode.
The error occurs only when `loadLibrary()` is called with the argument `resolved = false`.
A const string reference is not possible here because a temporary copy of
lResolved would be referenced. The return type of libStem.str() has the
value type prvalue. Therefore, lResolved requires the same type and the
compiler inserts a copy constructor to satisfy this. For more details
see rule 3.3.1 here:
https://en.cppreference.com/w/cpp/language/operator_other#Conditional_operator
* make .Class the verbose equivalent of .class and take into account name passed to .Class. As it was the case in CINT.
* merge similar functions into one with a verbose arg
* MetaSema: add short version of help, as in quit
Primer: join help and ?, mention .quit and .exit
TRint: mention .?
TApplication: mention .? and CINT 2 Cling
* clarify class name with ROOT7
Implicit instantiation of a function template calls
`DeclCollector::HandleCXXImplicitFunctionInstantiation()`, which appends the
FunctionDecl to the transaction. According to clang documentation, the body of
the function has not yet been instantiated. `HandleTopLevelDecl()` will be
called again for this decl at the end of the TU, which will append it
again to the transaction - same `Decl *`, different ConsumerCallInfo.
This is by design. However, unloading of decls in the transaction should
not process the same `Decl *` twice. In particular, entries with ConsumerCallInfo
== `kCCIHandleCXXImplicitFunctionInstantiation` will omitted.
Fixes issue #9850.
From SemaDeclCXX.cpp:
```
C++ [namespace.unnamed]p1. An unnamed-namespace-definition behaves as if it
were replaced by
namespace unique { /* empty body */ }
using namespace unique;
namespace unique { namespace-body }
where all occurrences of 'unique' in a translation unit are replaced by the same
identifier and this identifier differs from all other identifiers in the entire
program.
```
Thus, the first declaration of an unnamed namespace creates an implicit
UsingDirectiveDecl that makes the names available in the parent DC.
If we are reverting such first declaration, make sure we reset the anonymous
namespace for the parent DeclContext so that the implicit UsingDirectiveDecl
is created again when parsing the next anonymous namespace.
Fixes issue #7483.
Value printing an expression of type `AutoType` ended up in calling the general
fallback `printValue(const void *)`.
To call the appropriate overload, the deduced type should be used instead.
Fixes ROOT-9687.
This change was from MCJIT times and now is not needed anymore. Moreover, the
orcv2 jit infrastructure considers the llvm::Module immutable after it takes
control of it via emitModule. This change will allow us to migrate easier to
orcv2.
Related to the discussion in ROOT-5971 (see https://sft.its.cern.ch/jira/browse/ROOT-5971),
this commit improves the situation by diagnosing the shadowing of declarations
in the `std` namespace.
In summary, given that ROOT issues an implicit `using namespace std;` and due to
the way `SemaLookup` works, decls that shadow something in the `std` namespace
cannot be referenced without using their fully-qualified name, i.e. `::xxx`.
Thus, we need to emit a warning for that case.
This member provides additional information about the context in which parsing
occurs.
In particular, the `kInputFromFile` and `kIFFLineByLine` flags allow to tell
whether a sequence of calls to `Interpreter::process()` is issued from
`MetaProcessor::readInputFromFile()` for the contents of an external file.
Declarations extracted by DeclExtractor, regardless of their type, should be
moved to the parent declaration context (be it the `TranslationUnitDecl` or a
`NamespaceDecl` if DefinitionShadower is enabled).
This prevents the following situation:
```
root [] struct X {} foo
(struct X &) @0x7f545a5ff018
root [] .stats asttree
|-NamespaceDecl 0x5647ecc93780 <<invalid sloc>> <invalid sloc> __cling_N50 inline
| |-VarDecl 0x5647ecc89f10 <ROOT_prompt_0:1:1, col:13> col:13 used foo 'struct X':'X' callinit
| | `-CXXConstructExpr 0x5647ecc8a420 <col:13> 'struct X':'X' 'void () noexcept'
| `-FunctionDecl 0x5647ecc89bc8 <input_line_8:1:1, ROOT_prompt_0:3:1> input_line_8:1:6 __cling_Un1Qu30 'void (void *)'
...
|-CXXRecordDecl 0x5647ecc89c98 <line:1:1, col:11> col:8 struct X definition
```
`MetaProcessor::awaitingMoreInput()` returns whether the collected input is
incomplete, either because it contains unbalanced braces or we found a
backslash-newline (the last seen token is a `\`).
Part of a patch series to fix ROOT-5219.
Co-authored-by: Axel Naumann <Axel.Naumann@cern.ch>
`InputValidator::getLastResult()` returns the validation result of the last call
to `validate()`.
This will be used to implement `MetaProcessor::awaitingMoreInput()`.
Part of a patch series to fix ROOT-5219.
This reverts commit eb52895d22aaad0a88d47b8e7bb18c7f47ff35be.
As discussed, we should try to make clang parse input containing solely a
function-style cast (e.g. `bool(i)`) as an expression instead of a declaration.
In the interim, this patch is reverted to silence unwanted warnings in
third-party code.
The PR https://github.com/root-project/root/pull/9695 will also be closed.
This was an oversight in commit 34590aeef4: After fixing the handler
blocks, the code needs to create new CXXCatchStmts to eventually
construct the CXXTryStmt.
Fixes#9664
As the JIT does not provide debug symbols (yet), users see
only the call frames invoking the JIT - which is not helpful
as it is unrelated to their code.
We can turn this back on (possibly restricting to JIT frames)
once we emit debug symbols in the JIT.
This reverts commit 0cdfa69f216854d7319a6a31a61021a1e5ac45de.
We need to hide json includes: modules cannot cope with them, and it introduces a runtime requirement to find json.
`RunFunction()` might trigger unloading of `lastT`, so store its setting
for "want value printing" in a local variable before calling RunFunction().
Fixes valgrind complaining about `./stressInterpreter` which is reloading
the "outer" stressInterpreter.cxx from inside `RunFunction()`.
When determining whether a weak symbol was already emitted (and its
subsequent definition can thus be replaced by a declaration) look
for emitted symbols in the symbol table and the in-process symbols,
instead of possibly generating symbols through the JIT. This prevents
symbols being emitted that refer into
IncrementalExecutor::m_PendingModules elements that have since been
removed.
The case of `ExprAddresses == nullptr` seems to be naturally handled in the
lines below. Therefore, removing this assertion -as discussed with vvassilev.
Closes issue #8389.
This is now hit for variables on Windows (which don't see the GlobalVariable case).
Before the `#ifndef WIN32`, this case was not hit by roottest, neither on Windows
nor macOS nor Linux - so the coverage of "make it a declaration" is good.