[clang] [clang][dataflow] Handle CXXInheritedCtorInitExpr in ResultObjectVisitor. (PR #99616)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 23 23:52:27 PDT 2024
================
@@ -442,6 +442,46 @@ TEST_F(EnvironmentTest, CXXDefaultInitExprResultObjIsWrappedExprResultObj) {
&Env.getResultObjectLocation(*DefaultInit->getExpr()));
}
+TEST_F(EnvironmentTest, ResultObjectLocationForInheritedCtorInitExpr) {
----------------
martinboehme wrote:
> The problem is that the specific part of the AST I am interested to (a CXXConstructorDecl) is implicitly "generated" (because it is an inherited constructor), so I can't put an annotation inside of it.
Ah, thanks for the explanation, I understand now. Yes, agree that you can't do this in the way we do other tests for `getResultObjectLocation()` in TransferTest.cpp.
Can you add a comment to the test that explains this (and points out that most of the tests for `getResultObjectLocation()` are in TransferTest.cpp)? I'd like to avoid other tests for `getResultObjectLocation()` getting added next to this test just because it looks like the right place for them.
https://github.com/llvm/llvm-project/pull/99616
More information about the cfe-commits
mailing list