]> granicus.if.org Git - clang/commitdiff
[analyzer] Fix -x language argument for C preprocessed sources
authorJonathan Roelofs <jonathan@codesourcery.com>
Mon, 29 Jan 2018 16:37:53 +0000 (16:37 +0000)
committerJonathan Roelofs <jonathan@codesourcery.com>
Mon, 29 Jan 2018 16:37:53 +0000 (16:37 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@323664 91177308-0d34-0410-b5e6-96231b3b80d8

tools/scan-build/libexec/ccc-analyzer

index b0ec7e7e7487e9d0859a88d36b7eca491157f205..73cd2ff3d9153a546736f3b38f130079e9e43322 100755 (executable)
@@ -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
 );