[PATCH] D156378: [clang][CGExprConstant] handle unary negation on integrals

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 2 15:51:07 PDT 2023


efriedma added inline comments.


================
Comment at: clang/lib/CodeGen/CGExprConstant.cpp:1366
 
+  llvm::Constant *VisitUnaryOperator(UnaryOperator *U, QualType T) {
+    switch (U->getOpcode()) {
----------------
StmtVisitor supports defining a function "VisitUnaryMinus", so you don't have to switch() over the opcode.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D156378



More information about the cfe-commits mailing list