This revision was automatically updated to reflect the committed changes.
Closed by commit rG769333aeeb45: [clang][CGExprConstant] handle unary negation
on integrals (authored by nickdesaulniers).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
efriedma accepted this revision.
efriedma added a comment.
This revision is now accepted and ready to land.
LGTM
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156378/new/
https://reviews.llvm.org/D156378
nickdesaulniers updated this revision to Diff 546634.
nickdesaulniers marked an inline comment as done.
nickdesaulniers added a comment.
- prefer VisitUnaryMinus as per @efriedma
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156378/new/
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
nickdesaulniers updated this revision to Diff 544538.
nickdesaulniers added a comment.
- fix oneline class
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156378/new/
https://reviews.llvm.org/D156378
Files:
clang/lib/CodeGen/CGExprConstant.cpp
nickdesaulniers created this revision.
Herald added a project: All.
nickdesaulniers requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Consider the statement:
int x = -1;
And the following AST:
`-VarDecl 0x55c4823a7670 col:5 x 'int'