On May 2, 2012, at 14:55, Matthieu Monrocq wrote: > However we would have to leave it up to the user to detect that the function > invocation is now useless, since C++ has unfortunately no notion of purity.
Going on a tangent, I know, but __attribute__((pure)) and __attribute__((const)) have been around for a long time, and are exposed in our codebase as LLVM_READONLY and LLVM_READNONE, respectively. IIRC Clang is already smart enough to take these annotations into account both for optimization and for warnings like -Wunused. Jordy _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
