rnk added inline comments.
================ Comment at: clang/include/clang/AST/Expr.h:670-672 + /// Evaluate an expression that is required to be a core constant expression. + bool EvaluateAsCoreConstExpr(EvalResult &Result, QualType ParamType, + CCEKind CCE, const ASTContext &Ctx) const; ---------------- rsmith wrote: > Seems strange to pass a converted constant expression kind to an 'evaluate as > core constant expression' function. And it seems like we don't need the kind > here, just an "evaluating for emission w/relocations" vs "evaluating for > mangling" enum. > > Also, we need to evaluate non-type template arguments as constant > expressions, not just as core constant expressions, which the implementation > does, but the name and comment here don't reflect. (The difference is that > you can't result in a pointer/reference to a temporary or automatic / thread > storage duration entity.) So... what are these things? Converted constant expressions? What are we evaluating them as? I guess they're not rvalues or lvalues. https://reviews.llvm.org/D43320 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits