aaron.ballman added inline comments.
================ Comment at: clang/lib/AST/ExprConstant.cpp:10188 + bool VisitUnaryOperator(const UnaryOperator *E); + // FIXME: Missing: unary ~, conditional operator (for GNU // conditional select), shufflevector, ExtVectorElementExpr ---------------- Comment can be updated as we're not missing `~` any longer. ================ Comment at: clang/lib/AST/ExprConstant.cpp:10399 + Elt.getInt() = !Elt.getInt(); + // operator - on vectors returns -1 for 'truth', so negate it. + Elt.getInt().negate(); ---------------- `operator!`, right? ================ Comment at: clang/lib/AST/ExprConstant.cpp:10405-10406 + "Vector can only be int or float type"); + // Float types result in an int of the same size, but -1 or 0 for true and + // false. + APSInt EltResult{Ctx.getIntWidth(ResultTy), ---------------- -1 for true and 0 for false (just to be super clear). CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115670/new/ https://reviews.llvm.org/D115670 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits