Izaron marked an inline comment as done. Izaron added a comment. In D144334#4142490 <https://reviews.llvm.org/D144334#4142490>, @erichkeane wrote:
> Just deliberately not support a part of C++2b. Implementers have veto'ed > features in the past exactly that way. That's sad. Let's at least write some warning on the `cxx_status.html` like "we aren't gonna implement it". ================ Comment at: clang/lib/CodeGen/CGStmt.cpp:723-727 + case attr::Assume: { + llvm::Value *ArgValue = EmitScalarExpr(cast<AssumeAttr>(A)->getCond()); + llvm::Function *FnAssume = CGM.getIntrinsic(llvm::Intrinsic::assume); + Builder.CreateCall(FnAssume, ArgValue); + break; ---------------- cor3ntin wrote: > I'm not familiar with codegen. what makes the expression non-evaluated here? The LLVM docs says it: https://llvm.org/docs/LangRef.html#llvm-assume-intrinsic > No code is generated for this intrinsic, and instructions that contribute > only to the provided condition are not used for code generation The `ArgValue` and `FnAssume` are the instructions to be discarded according to this sentence. I guess they do it via dead code elimination (at any optimization level). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144334/new/ https://reviews.llvm.org/D144334 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits