[PATCH] D134020: [clang][Interp] Handle enums

Shafik Yaghmour via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 16 11:23:18 PDT 2022


shafik added inline comments.


================
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:861
+
+    return this->emitConst(T, getIntWidth(ECD->getType()), ECD->getInitVal(),
+                           E);
----------------
If I check out `IntExprEvaluator::CheckReferenceDecl(...)` it is checking the sign and width match between the expression and the `EnumConstantDecl`. I am guessing we need to do that here as well?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134020



More information about the cfe-commits mailing list