-
Notifications
You must be signed in to change notification settings - Fork 302
Open
Labels
Description
- Checked for duplicates
Describe the bug
I'm unable to compile Cling at release tag v1.2. I'm using the latest cling-llvm18 branch at root-project/llvm-project@156e947.
The problem is this new Parser(...) call, which passes 4 arguments instead of 3:
cling/lib/Interpreter/Interpreter.cpp
Lines 270 to 272 in 074107f
| m_LookupHelper.reset(new LookupHelper(new Parser(PP, SemaRef, | |
| /*SkipFunctionBodies*/false, | |
| /*isTemp*/true), this)); |
which produces a build error like this:
cling-unwrapped> /build/source/cling-source/lib/Interpreter/Interpreter.cpp:270:47: error: no matching constructor for initialization of 'Parser'
cling-unwrapped> 270 | m_LookupHelper.reset(new LookupHelper(new Parser(PP, SemaRef,
cling-unwrapped> | ^ ~~~~~~~~~~~~
cling-unwrapped> 271 | /*SkipFunctionBodies*/false,
cling-unwrapped> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cling-unwrapped> 272 | /*isTemp*/true), this));
cling-unwrapped> | ~~~~~~~~~~~~~~
cling-unwrapped> /build/source/llvm/../clang/include/clang/Parse/Parser.h:463:3: note: candidate constructor not viable: requires 3 arguments, but 4 were provided
I'm unable to find a version of LLVM where this Parser constructor has 4 arguments, so I'm not sure how this ever worked.
It seems to be fixed by a later commit in master: cd4d1d8. If I backport that commit to v1.2, it builds.
Additional context
I'm using the approach described in "Building Cling Along with LLVM" in the README.
You can see exactly how I'm building this (as part of Nixpkgs) here.
dimitry-ishenko