[PATCH] D153695: [clang][Interp] Fix passing parameters of composite type

Timm Bäder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 4 21:27:52 PDT 2023


tbaeder marked 3 inline comments as done.
tbaeder added inline comments.


================
Comment at: clang/lib/AST/Interp/ByteCodeEmitter.h:71
 
-  /// Parameter indices.
-  llvm::DenseMap<const ParmVarDecl *, unsigned> Params;
+  /// Parameter indices. <AstNode*, pair<Offset, IsPrimitive>>
+  llvm::DenseMap<const ParmVarDecl *, ParamOffset> Params;
----------------
shafik wrote:
> I don't understand the additional comment,
It's supposed to be the types of the map, but I've removed the comment change locally.


================
Comment at: clang/lib/AST/Interp/Context.cpp:30
 bool Context::isPotentialConstantExpr(State &Parent, const FunctionDecl *FD) {
+  llvm::errs() << __PRETTY_FUNCTION__ << "\n";
+  FD->dump();
----------------
shafik wrote:
> left over debugging code?
Yes


================
Comment at: clang/lib/AST/Interp/Context.cpp:56
 bool Context::evaluateAsRValue(State &Parent, const Expr *E, APValue &Result) {
+  llvm::errs() << __PRETTY_FUNCTION__ << "\n";
+  E->dump();
----------------
shafik wrote:
> Left over debugging code?
Yes


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D153695



More information about the cfe-commits mailing list