[cfe-dev] Fixing semantic diagnostics that embed english words

Nicola Gigante nicola.gigante at gmail.com
Sat Dec 12 11:38:57 PST 2009


Hello,

I'm sending a patch that fixes some diagnostic messages that used to embed english words as arguments.
Previously, those string were flying around the various Sema*.cpp files as a const char *Flavor argument passed
to the DiagnoseAssignmentResult() method and a couple of others.

I've replaced those strings with values from an AssignmentAction enumeration declared in Sema.h around line 830. Is it ok to do things like that? The constants' name of the enumeration are very similar to the strings that they represents.

In the meantime, I've found that a similar Flavor argument was passed to BuildCXXDerivedToBaseExpr() method but that it wasn't used anywhere so I've removed it, is it ok?

I've run the tests and everything seems ok.

I hope this is useful, bye bye,

Nicola

-------------- next part --------------
A non-text attachment was scrubbed...
Name: diag_assignment_messages.patch
Type: application/octet-stream
Size: 31851 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20091212/5ce35681/attachment.obj>


More information about the cfe-dev mailing list