[cfe-commits] r110568 - in /cfe/trunk: include/clang/Basic/DiagnosticParseKinds.td lib/Parse/ParseCXXInlineMethods.cpp
Chris Lattner
clattner at apple.com
Mon Aug 9 17:18:25 PDT 2010
>>>>
>>>> It sounds like it should be an assert then... Doug?
>>>
>>> No, not here. This check verifies that a "real" parse of an expression consumes exactly the same tokens as a "fake" balanced-delimiter parse used to cache the tokens. For well-formed code, this is an invariant. For ill-formed code, it's not an invariant, and we might not know that the code is ill-formed until we hit this point.
>>>
>>> Here's a test case, by the way:
>>>
>>> struct X {
>>> void f(int x = 1:);
>>> };
>>
>> Whoa whoa, totally misunderstood the issue, thanks for the test case!
>
> :)
Ok, I didn't understand the issue either. I thought it would be diagnosed earlier. Making it an error makes sense, thanks!
-Chris
More information about the cfe-commits
mailing list