================
@@ -146,6 +146,30 @@ TEST_F(DataflowAnalysisTest,
DiagnoseFunctionDiagnoserCalledOnEachElement) {
" (Lifetime ends)\n")));
}
+TEST_F(DataflowAnalysisTest, CanAnalyzeStmt) {
+ std::string Code = R"cc(
+ struct S {int i;};
+ S getAnS() {return S{1};};
+ void foo() {
+ S AnS = getAnS();
+ }
+ )cc";
+ AST = tooling::buildASTFromCodeWithArgs(Code, {"-std=c++11"});
+ const auto &DeclStatement = matchNode<DeclStmt>(declStmt());
----------------
martinboehme wrote:
As above: Match the name of the declaration?
https://github.com/llvm/llvm-project/pull/91616
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits