[PATCH] D149834: [clang][Interp] Fix ignoring TypeTraitExprs
Timm Bäder via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 1 01:58:57 PDT 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb864592915ae: [clang][Interp] Fix ignoring TypeTraitExprs (authored by tbaeder).
Changed prior to commit:
https://reviews.llvm.org/D149834?vs=520340&id=545964#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149834/new/
https://reviews.llvm.org/D149834
Files:
clang/lib/AST/Interp/ByteCodeExprGen.cpp
clang/test/AST/Interp/literals.cpp
Index: clang/test/AST/Interp/literals.cpp
===================================================================
--- clang/test/AST/Interp/literals.cpp
+++ clang/test/AST/Interp/literals.cpp
@@ -895,6 +895,8 @@
(void)5, (void)6;
1 ? 0 : 1;
+ __is_trivial(int);
+
return 0;
}
Index: clang/lib/AST/Interp/ByteCodeExprGen.cpp
===================================================================
--- clang/lib/AST/Interp/ByteCodeExprGen.cpp
+++ clang/lib/AST/Interp/ByteCodeExprGen.cpp
@@ -958,6 +958,8 @@
template <class Emitter>
bool ByteCodeExprGen<Emitter>::VisitTypeTraitExpr(const TypeTraitExpr *E) {
+ if (DiscardResult)
+ return true;
return this->emitConstBool(E->getValue(), E);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149834.545964.patch
Type: text/x-patch
Size: 722 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230801/9edba3c6/attachment.bin>
More information about the cfe-commits
mailing list