[PATCH] D150040: [clang][Interp] Call invalid destructors

Timm Bäder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 8 06:31:29 PDT 2023


tbaeder added inline comments.


================
Comment at: clang/test/AST/Interp/records.cpp:606
+    S{}; // ref-note {{in call to '&S{}->~S()'}}
+    return 1; // expected-note {{in call to '&S{}->~S()'}}
+              // FIXME: ^ Wrong line
----------------
erichkeane wrote:
> Which DTOR is happening here that changes behavior in this patch?  You removed the `isConstexpr` test, but it seems to me that the `S` destructor is constexpr, right?
`Function::isConstexpr()` doesn't return the same as `FunctionDecl::isConstexpr()` - it's just `return IsValid` right now, so if the compilation of the function aborts at any point, `Function::isConstexpr()` returns `false` (even if the function that was compiled is `constexpr`).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150040/new/

https://reviews.llvm.org/D150040



More information about the cfe-commits mailing list