r201620 - PR13110: Add a -Wignored-qualifiers warning when ignoring a const, volatile, or

Rafael Espíndola rafael.espindola at gmail.com
Wed Feb 19 13:25:51 PST 2014

> Looks like all nine of the warnings are triggered by this single line
> in "llvm/include/llvm/Support/ErrorOr.h" —
>     const reference get() const { return const_cast<ErrorOr<T> >(this)->get(); }
> — which is EXACTLY the case I was hoping would get caught by this
> diagnostic! Awesome! :)  Here, `const reference` should presumably
> read `const_reference`. (Assuming there's a member typedef by that
> name, that is. I bet there is.)

You are right. In fact Alexey Samsonov fixed this in r201651.


More information about the cfe-commits mailing list