When deciding not to wrap add the last token ';' we advanced to.
This fixes Github issue 113, breaking Jupiter notebooks.
This commit is contained in:
parent
e4f2dddf5a
commit
fbd110fc67
@ -382,7 +382,10 @@ size_t cling::utils::getWrapPoint(std::string& source,
|
||||
}
|
||||
// There is "more" - let's assume this input consists of a using
|
||||
// declaration or definition plus some code that should be wrapped.
|
||||
return getFileOffset(Tok);
|
||||
//
|
||||
// We need to include the ';' in the offset as this will be a
|
||||
// non-wrapped statement.
|
||||
return getFileOffset(Tok) + 1;
|
||||
}
|
||||
if (keyword.equals("extern"))
|
||||
return std::string::npos;
|
||||
|
@ -228,4 +228,8 @@ int *& RefRPtr = RPtr;
|
||||
cIntStarRef(RefRPtr)
|
||||
// CHECK: (int *) 0x{{[0-9]+}}
|
||||
|
||||
namespace Issue_113 {}
|
||||
// Keep the blank space after the using clause.
|
||||
using namespace Issue_113;
|
||||
|
||||
// expected-no-diagnostics
|
||||
|
Loading…
x
Reference in New Issue
Block a user