[PATCH] D134057: [clang][Interp] Start implementing record types

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 16 10:39:56 PDT 2022


erichkeane added inline comments.


================
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:316
+  // Base above gives us a pointer on the stack.
+  const auto *FD = dyn_cast<FieldDecl>(Member);
+  assert(FD);
----------------
I THINK Member is a ValueDecl because it could be a member function, right?  So forcing it to be a FieldDecl here is likely not valid.  Perhaps in the 'non-FieldDecl' case we could jsut return false for now?

ALSO, don't do a dyn_cast followed by an assert, `cast` will do the assert for you.


================
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:659
+
+    // FIXME
+    const Stmt *Body = Ctor->getBody();
----------------
Eh?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134057



More information about the cfe-commits mailing list