This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
tbaeder marked an inline comment as done.
Closed by commit rG95e6a407d92b: [clang][Interp] Implement IntegralToBoolean
casts (authored by tbaeder).
Repository:
rG LL
tbaeder marked an inline comment as done.
tbaeder added inline comments.
Comment at: clang/lib/AST/Interp/Boolean.h:90
+ template static Boolean from(T Value) {
+if constexpr (std::is_integral::value)
+ return Boolean(Value != 0);
shafik wrote:
> This
shafik added inline comments.
Comment at: clang/lib/AST/Interp/Boolean.h:90
+ template static Boolean from(T Value) {
+if constexpr (std::is_integral::value)
+ return Boolean(Value != 0);
This should work for `floating_point` as well.
===
aaron.ballman accepted this revision.
aaron.ballman added a comment.
LGTM!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132739/new/
https://reviews.llvm.org/D132739
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.o
erichkeane added inline comments.
Comment at: clang/lib/AST/Interp/Opcodes.td:433
+def ToCastTypeClass : TypeClass {
+ let Types = [Sint32, Bool];
}
tbaeder wrote:
> erichkeane wrote:
> > tbaeder wrote:
> > > erichkeane wrote:
> > > > Not sure how this works...
tbaeder updated this revision to Diff 455897.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132739/new/
https://reviews.llvm.org/D132739
Files:
clang/lib/AST/Interp/Boolean.h
clang/lib/AST/Interp/ByteCodeExprGen.cpp
clang/lib/AST/Interp/Opcodes.td
clang/test/AST/Interp/literals.c
tbaeder added inline comments.
Comment at: clang/lib/AST/Interp/Opcodes.td:433
+def ToCastTypeClass : TypeClass {
+ let Types = [Sint32, Bool];
}
erichkeane wrote:
> tbaeder wrote:
> > erichkeane wrote:
> > > Not sure how this works... but is this ONLY int-32 t
erichkeane added inline comments.
Comment at: clang/lib/AST/Interp/Opcodes.td:433
+def ToCastTypeClass : TypeClass {
+ let Types = [Sint32, Bool];
}
tbaeder wrote:
> erichkeane wrote:
> > Not sure how this works... but is this ONLY int-32 to bool and vice versa
tbaeder added inline comments.
Comment at: clang/lib/AST/Interp/Opcodes.td:433
+def ToCastTypeClass : TypeClass {
+ let Types = [Sint32, Bool];
}
erichkeane wrote:
> Not sure how this works... but is this ONLY int-32 to bool and vice versa?
> The implementati
erichkeane accepted this revision.
erichkeane added inline comments.
This revision is now accepted and ready to land.
Comment at: clang/lib/AST/Interp/Opcodes.td:433
+def ToCastTypeClass : TypeClass {
+ let Types = [Sint32, Bool];
}
Not sure how this works... b
tbaeder created this revision.
tbaeder added reviewers: aaron.ballman, erichkeane, shafik, tahonermann.
Herald added a subscriber: inglorion.
Herald added a project: All.
tbaeder requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Redo how we d
11 matches
Mail list logo