<br><br><div class="gmail_quote">On Fri, May 4, 2012 at 10:30 PM, Manuel Klimek <span dir="ltr"><<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Fri, May 4, 2012 at 9:56 PM, Simon Atanasyan <<a href="mailto:satanasyan@mips.com">satanasyan@mips.com</a>> wrote:<br>
> On Fri, May 4, 2012 at 7:39 PM, Manuel Klimek <<a href="mailto:klimek@google.com">klimek@google.com</a>> wrote:<br>
>> I haven't put too much thought into the interface yet, but I'd imagine<br>
>> something along the lines of<br>
>> class ArgumentAdjuster {<br>
>> public:<br>
>>  vector<std::string> Adjust(const vector<std::string> &Arguments) = 0;<br>
>> };<br>
>><br>
>> class ClangSyntaxOnlyAdjuster : public ArgumentAdjuster { ... };<br>
>><br>
>> Then, for people who have command lines that are for gcc for some reasons:<br>
>> class GccToClangAdjuster : public ArgumentAdjuster { ... };<br>
>><br>
>> Then we can install a ClangSyntaxOnlyAdjuster per default and add a<br>
>> method to ClangTool:<br>
>> void setArgumentAdjuster(ArgumentAdjuster *Adjuster);<br>
>><br>
>> I think the argument adjusting is orthogonal to the tool, so I'd<br>
>> rather avoid inheritance on the ClangTool level.<br>
><br>
> Now I see your point and like this approach. I will implement and send<br>
> a patch for review.<br>
<br>
</div>Thx! Looking forward to it :)<br>
<div class="HOEnZb"><div class="h5"><br></div></div></blockquote></div><br>It always bothered me a bit, so since this is going to be adjusted...<br><br>Is there a fundamental reason to reason in terms of `string` here ?<br>
<br>Or more accurately, I understand that parsing the command line requires strings in input, but why should it produce strings in output, instead of a more canonical form ?<br><br>-- Matthieu<br>