cppfront
cppfront copied to clipboard
fix(to_cpp1): improve recognition of dependent types and deducible parameters
Resolves #534. Resolves #595. Resolves #628 (as a discussion, this needs to be manually closed). Adds what's needed to diagnose #572.
Turns out I was wrong.
There's regression-tests/test-results/clang-12/pure2-bugfix-for-non-local-function-expression.cpp.output.
It's just a mismatch between Herb's script and the CMake buildsystem I'm using.
Previous
I would like to test commit 024f554930f9804fe1ce4f3eab264126da2f9cf1. Unfortunately, there's no precedent for tests that fail with a hard error during Cpp1. And I don't just do it because, unlike Cppfront, the Cpp1 compilers emit the source's full path in the error, preventing me from committing portable test results.
Patch for merging with #596:
diff --git a/source/to_cpp1.h b/source/to_cpp1.h
index 2ece7c3..503cf12 100644
--- a/source/to_cpp1.h
+++ b/source/to_cpp1.h
@@ -2019,6 +2019,12 @@ public:
{
return self->is_dependent(*expr.result_type);
}
+
+ auto operator()(requires_expression_node const&) const
+ -> bool
+ {
+ return false;
+ }
};
auto is_dependent(