[cfe-commits] [PATCH] Provide better error messages for incorrect matchers

Manuel Klimek klimek at google.com
Thu Sep 20 10:51:19 PDT 2012

On Thu, Sep 20, 2012 at 7:32 PM, Doug Gregor
<reviews at llvm-reviews.chandlerc.com> wrote:
>   Hate to ask, but... why are we changing the way we use C++ to improve the error messages, rather than making Clang produce better error messages in the first place? The latter has far more value.

It seems to me like this is an inherent problem of how template
instantiation works, but I might be wrong:
previously we would always have a conversion operator, but the
instantiation of it was able to fail - thus, how do you decide whether
to show the programmer the error of at which exact point the
instantiation failed (in this case inside an instantiation that
triggers an instantiation that would call a method that the user isn't
even aware is called anywhere), or to show that there's no possible

Now because of SFINAE, using the higher level meta-programming
abstractions the programmer tells the compiler: this is actually
intended to fail at this specific point - no need to dig further for
error causes.


More information about the cfe-commits mailing list