aaron.ballman added a comment. Nice! Just a few more small nits to fix that I can see.
================ Comment at: clang/lib/Analysis/CFG.cpp:1016-1021 + Optional<llvm::APInt> getIntegerLiteralSubexpressionValue(const Expr *E) { + + const auto *UnOp = dyn_cast<UnaryOperator>(E->IgnoreParens()); + + // If unary. + if (UnOp) { ---------------- Oops, I realized we could simplify this further and keep `UnOp` scoped more tightly to where it's used. ================ Comment at: clang/lib/Analysis/CFG.cpp:1026-1032 + if (const auto *IntLiteral = dyn_cast<IntegerLiteral>(SubExpr)) { + + llvm::APInt Value = IntLiteral->getValue(); + UnaryOperatorKind OpCode = UnOp->getOpcode(); + + // Perform the operation manually. + switch (OpCode) { ---------------- Another simplification to scope things more tightly. ================ Comment at: clang/lib/Analysis/CFG.cpp:1045-1047 + } + + } else if (const auto *IntLiteral = ---------------- Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130510/new/ https://reviews.llvm.org/D130510 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits