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

2022-09-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/AST/Interp/enums.cpp:25 + SIX = FIVE + 2, + +}; tbaeder wrote: > aaron.ballman wrote: > > tbaeder wrote: > > > aaron.ballman wrote: > > > > tbaeder wrote: > > > > > aaron.ballman wrote: > > > > > > tbae

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

2022-09-29 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/test/AST/Interp/enums.cpp:25 + SIX = FIVE + 2, + +}; aaron.ballman wrote: > tbaeder wrote: > > aaron.ballman wrote: > > > tbaeder wrote: > > > > aaron.ballman wrote: > > > > > tbaeder wrote: > > > > > > shafik wro

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

2022-09-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/AST/Interp/enums.cpp:25 + SIX = FIVE + 2, + +}; tbaeder wrote: > aaron.ballman wrote: > > tbaeder wrote: > > > aaron.ballman wrote: > > > > tbaeder wrote: > > > > > shafik wrote: > > > > > > Maybe some

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

2022-09-29 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/test/AST/Interp/enums.cpp:25 + SIX = FIVE + 2, + +}; aaron.ballman wrote: > tbaeder wrote: > > aaron.ballman wrote: > > > tbaeder wrote: > > > > shafik wrote: > > > > > Maybe some edge case values for enumerators

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

2022-09-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/AST/Interp/enums.cpp:25 + SIX = FIVE + 2, + +}; tbaeder wrote: > aaron.ballman wrote: > > tbaeder wrote: > > > shafik wrote: > > > > Maybe some edge case values for enumerators like `__INT_MAX__ *2U +1

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

2022-09-29 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/test/AST/Interp/enums.cpp:25 + SIX = FIVE + 2, + +}; aaron.ballman wrote: > tbaeder wrote: > > shafik wrote: > > > Maybe some edge case values for enumerators like `__INT_MAX__ *2U +1U` > > > (UINT_MAX) > > >

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

2022-09-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/AST/Interp/enums.cpp:25 + SIX = FIVE + 2, + +}; tbaeder wrote: > shafik wrote: > > Maybe some edge case values for enumerators like `__INT_MAX__ *2U +1U` > > (UINT_MAX) > > > > and > > > > ``` > >

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

2022-09-29 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/test/AST/Interp/enums.cpp:25 + SIX = FIVE + 2, + +}; shafik wrote: > Maybe some edge case values for enumerators like `__INT_MAX__ *2U +1U` > (UINT_MAX) > > and > > ``` > enum E { // warning: enumeration val

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

2022-09-29 Thread Timm Bäder via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGc090295916a9: [clang][Interp] Handle enums (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

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

2022-09-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134020/new/ https://reviews.llvm.org/D134020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

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

2022-09-26 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 462826. tbaeder marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134020/new/ https://reviews.llvm.org/D134020 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/test/AST/Interp/enums.cpp Index: clang/test/AST/I

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

2022-09-23 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik accepted this revision. shafik added a comment. This revision is now accepted and ready to land. LGTM Comment at: clang/test/AST/Interp/enums.cpp:25 + SIX = FIVE + 2, + +}; Maybe some edge case values for enumerators like `__INT_MAX__ *2U +1U` (UINT_M

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

2022-09-20 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Anything still missing here? (CI failure is because one of the other patches is missing) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134020/new/ https://reviews.llvm.org/D134020 _

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

2022-09-16 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:861 + +return this->emitConst(T, getIntWidth(ECD->getType()), ECD->getInitVal(), + E); tbaeder wrote: > shafik wrote: > > If I check out `IntExprEval

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

2022-09-16 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:861 + +return this->emitConst(T, getIntWidth(ECD->getType()), ECD->getInitVal(), + E); shafik wrote: > If I check out `IntExprEvaluator::CheckReferen

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

2022-09-16 Thread Shafik Yaghmour via Phabricator via cfe-commits
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 i

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

2022-09-16 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. In D134020#3795091 , @erichkeane wrote: > I can't come up with a way to get a reference to one of these, so the logic > in the rest of the DeclRefExpr handling is a little MORE awkward looking now. > I think I'm OK with this,

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

2022-09-16 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Also note, the CI test is from your test! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134020/new/ https://reviews.llvm.org/D134020 ___ cfe-commits mailing list cfe-commits@l

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

2022-09-16 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. I can't come up with a way to get a reference to one of these, so the logic in the rest of the DeclRefExpr handling is a little MORE awkward looking now. I think I'm OK with this, but I want to give a few other folks a chance to look. Repository: rG LLVM Github M

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

2022-09-16 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, tahonermann, shafik. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Handle `DeclRefExpr`s pointing to `EnumConstantDecl