================
@@ -665,6 +665,24 @@ TEST(SelectionTest, InjectedClassName) {
   EXPECT_FALSE(D->isInjectedClassName());
 }
 
+TEST(SelectionTest, PseudoDestructorMissingTypeInfo) {
+  llvm::StringLiteral Code = R"cpp(
+    /*error-ok*/
+    struct A { ~A(); };
+    void b(const A *y) {
+      y->~decltype(A())();
+    }
+  )cpp";
+  auto AST = TestTU::withCode(Code).build();
+  bool Seen = false;
----------------
ArcsinX wrote:

nit: maybe we can add `// No crash`  comment (like here 
https://github.com/llvm/llvm-project/blob/main/clang-tools-extra/clangd/unittests/CompilerTests.cpp#L115)
  to make clear that we are checking that `SelectionTree::createEach` doesn't 
crash

https://github.com/llvm/llvm-project/pull/195939
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to