This is a bit awkward, since we get an APValue from the expression, which we then need to re-integrate into our bytecode/primtype based interpreter.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Note that you are probably need something like SourceLocExprScopeGuard to make source_location actually work, , it might be worth doing in this patch.
The idea is to remember the location of a call when evaluating default arguments / default member initializers
clang/test/AST/Interp/builtin-functions.cpp | ||
---|---|---|
245 | what is missing to enable the existing source location tests with the new intterpreter? |
Yeah I saw, that's what the FIXME comment is about.
clang/test/AST/Interp/builtin-functions.cpp | ||
---|---|---|
245 | There is a crash that I need to investigate first, but SemaCXX/source_location.cpp also uses stuff like static_assert(noexcept(...)); that I don't handle yet. |
clang/test/AST/Interp/builtin-functions.cpp | ||
---|---|---|
245 | Okay, after my last two patches I uploaded, the only problem missing is the broken source locations for initializers. |
clang/test/AST/Interp/builtin-functions.cpp | ||
---|---|---|
245 | I think it might be worth doing in this patch (unless it requires a lot of work) |
clang/test/AST/Interp/builtin-functions.cpp | ||
---|---|---|
245 | I was wrong and there's some other work needed. Namely, I need to redo how we do initializers. I will definitely tackel that this quarter and dial down the work on new features. |
@cor3ntin Ok, I need...
to enable the existing tests with at least one of the RUN lines.
FYI i think this is fine but I'm waiting for progress on the PRs that would allow us to enable more tests.
@tbaeder Maybe you could land the dependencies of this patch so that we can progress it. Thanks!
Having https://reviews.llvm.org/D144457 and https://reviews.llvm.org/D144457 approved would make rebasing easier :)
I can look into https://reviews.llvm.org/D144457, but then having to do https://reviews.llvm.org/D144457 right after is going to be tough. (I suspect there may be a copy pasta here.) ;-)
But once you've reviewed https://reviews.llvm.org/D144457, reviewing https://reviews.llvm.org/D144457 shouldn't be that hard? :)
I'm pretty sure the second link should've been https://reviews.llvm.org/D152132.
I dunno, I'm skeptical.
I'm pretty sure the second link should've been https://reviews.llvm.org/D152132.
Oh, so now we're moving the goalposts too? ;-) I'll check that one out next, thanks for clarifying!
I do in https://reviews.llvm.org/D156045, but that depends on other commits (not sure which exactly right now though).
what is missing to enable the existing source location tests with the new intterpreter?