[PATCH] [analyzer] Fix -x language argument for C preprocessed sources

Jon Roelofs via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 29 08:39:48 PST 2018


r323664

On Mon, Jan 15, 2018 at 8:35 AM, Jonathan Roelofs <jonathan at codesourcery.com
> wrote:

> LGTM. Would you like me to commit it for you?
>
>
> Jon
>
>
> On 1/14/18 3:50 AM, Paul Fertser wrote:
>
>> clang's -x option doesn't accept c-cpp-output as a language (even though
>> 463eb6ab was merged, the driver still doesn't handle that).
>>
>> This bug prevents testing C language projects when ccache is used.
>>
>> Fixes #25851.
>>
>> Investigation and patch by Dave Rigby.
>> ---
>>   tools/scan-build/libexec/ccc-analyzer | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/tools/scan-build/libexec/ccc-analyzer
>> b/tools/scan-build/libexec/ccc-analyzer
>> index b0ec7e7..73cd2ff 100755
>> --- a/tools/scan-build/libexec/ccc-analyzer
>> +++ b/tools/scan-build/libexec/ccc-analyzer
>> @@ -419,7 +419,7 @@ my %LangMap = (
>>     'cc'  => 'c++',
>>     'C'   => 'c++',
>>     'ii'  => 'c++-cpp-output',
>> -  'i'   => $IsCXX ? 'c++-cpp-output' : 'c-cpp-output',
>> +  'i'   => $IsCXX ? 'c++-cpp-output' : 'cpp-output',
>>     'm'   => 'objective-c',
>>     'mi'  => 'objective-c-cpp-output',
>>     'mm'  => 'objective-c++',
>> @@ -439,7 +439,7 @@ my %LangsAccepted = (
>>     "c" => 1,
>>     "c++" => 1,
>>     "objective-c++" => 1,
>> -  "c-cpp-output" => 1,
>> +  "cpp-output" => 1,
>>     "objective-c-cpp-output" => 1,
>>     "c++-cpp-output" => 1
>>   );
>>
>
> --
> Jon Roelofs
> jonathan at codesourcery.com
> CodeSourcery / Mentor Embedded / Siemens
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180129/bef05dbb/attachment-0001.html>


More information about the cfe-commits mailing list