[cfe-commits] r76436 - in /cfe/trunk: include/clang/Basic/DiagnosticParseKinds.td include/clang/Parse/Parser.h lib/Parse/ParseDecl.cpp lib/Parse/ParseDeclCXX.cpp test/SemaCXX/destructor.cpp
Fariborz Jahanian
fjahanian at apple.com
Mon Jul 20 15:45:10 PDT 2009
On Jul 20, 2009, at 3:20 PM, Douglas Gregor wrote:
>
> On Jul 20, 2009, at 10:43 AM, Fariborz Jahanian wrote:
>
>> Author: fjahanian
>> Date: Mon Jul 20 12:43:15 2009
>> New Revision: 76436
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=76436&view=rev
>> Log:
>> Issue a more descriptive diagnostics when mis-declaring
>> a destructor.
>
> I don't think that the diagnostic "destructor name must be same as
> the class name" is much of an improvement. Perhaps something like,
> "expected the class name after '~' to name a destructor"?
>
Done in :http://llvm.org/viewvc/llvm-project?view=rev&revision=76494
> It fits better for (admittedly stupid) cases like, e.g., "~operator+
> (int, int)".
>
> (another comment further down)
>
>> fier;
>
> In addition to these parser-level checks, we're missing the semantic
> checks to diagnose this error:
>
> struct X { };
> struct Y {
> ~X() { }
> };
Will do this next.
- fariborz
>
>
> - Doug
More information about the cfe-commits
mailing list