This revision was automatically updated to reflect the committed changes.
Closed by commit rGf6267d3b98c1: [clang][CGExprConstant] handle implicit
widening/narrowing Int-to-Int casts (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/D156466/new/
https://reviews.llvm.org/D156466
nickdesaulniers updated this revision to Diff 546646.
nickdesaulniers edited the summary of this revision.
nickdesaulniers added a comment.
- update description
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156466/new/
nickdesaulniers updated this revision to Diff 546645.
nickdesaulniers marked an inline comment as done.
nickdesaulniers added a comment.
- add test case that would have caught SExt bug
- fix SExt bug
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
efriedma added inline comments.
Comment at: clang/lib/CodeGen/CGExprConstant.cpp:1152
+ return CI;
+llvm::APInt A = CI->getValue().sextOrTrunc(DstWidth);
+return llvm::ConstantInt::get(CGM.getLLVMContext(), A);
sextOrTrunc()
shafik added a comment.
LGTM
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156466/new/
https://reviews.llvm.org/D156466
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
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 following statements:
long x = 1;
short y = 1;
With the following AST:
|-VarDecl