Fix build with assertions

Fixes commit 68769cd980 ("[cling] Move parts of Parse to another
function").
This commit is contained in:
Jonas Hahnfeld 2024-05-07 09:43:46 +02:00 committed by jenkins
parent be35aaef26
commit 65a2a778d1

View File

@ -976,11 +976,15 @@ namespace cling {
}
if (CO.CodeCompletionOffset != -1) {
#ifndef NDEBUG
Preprocessor& PP = m_CI->getPreprocessor();
SourceManager& SM = getCI()->getSourceManager();
assert((int)SM.getFileOffset(PP.getCodeCompletionLoc())
== CO.CodeCompletionOffset
&& "Completion point wrongly set!");
assert(PP.isCodeCompletionReached()
&& "Code completion set but not reached!");
#endif
// Let's ignore this transaction:
m_Consumer->getTransaction()->setIssuedDiags(Transaction::kErrors);