[cfe-commits] r155923 - /cfe/trunk/lib/Frontend/CompilerInstance.cpp
jediknil at belkadan.com
Wed May 2 17:18:40 PDT 2012
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.
More information about the cfe-commits