================
@@ -403,4 +405,35 @@ TEST_F(EnvironmentTest,
               Contains(Member));
 }
 
+TEST_F(EnvironmentTest, Stmt) {
+  using namespace ast_matchers;
+
+  std::string Code = R"cc(
+      struct S {int i;};
+      void foo() {
+        S AnS = S{1};
+      }
----------------
martinboehme wrote:

Is there a reason the variable declaration needs to be wrapped in a function? 
Seems it would be easier to do this with a global variable, and at the same 
time, this would demonstrate that we can analyze code that lives outside a 
function.
```suggestion
      S AnS = S{1};
```

https://github.com/llvm/llvm-project/pull/91616
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to