[clang] [Clang][Interp] Implement constexpr vector unary operators +, -, ~, ! (PR #105996)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 26 00:11:47 PDT 2024
================
@@ -5312,6 +5314,149 @@ bool Compiler<Emitter>::VisitComplexUnaryOperator(const UnaryOperator *E) {
return true;
}
+template <class Emitter>
+bool Compiler<Emitter>::VisitVectorUnaryOp(const UnaryOperator *E) {
+ const Expr *SubExpr = E->getSubExpr();
+ assert(SubExpr->getType()->isVectorType());
+
+ if (DiscardResult)
+ return this->discard(SubExpr);
+
+ std::optional<PrimType> ResT = classify(E);
----------------
tbaederr wrote:
`ResT` is unused except for in `prepareResult`. In what cases is `ResT` unset?
https://github.com/llvm/llvm-project/pull/105996
More information about the cfe-commits
mailing list