From ca3751bb45b1fe27fabe6468acf9a71119a6b0d9 Mon Sep 17 00:00:00 2001 From: Anton Yartsev Date: Wed, 16 Sep 2015 18:12:15 +0000 Subject: [PATCH] [analyzer] Improved behavior if Clang was not found, part II - scan-build help: display 'Could not query Clang for the list of available checkers.' + the reason why it happened so if clang was not found. - display requested/forced help in case of --use-analyzer=Xcode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247828 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/scan-build/scan-build | 84 ++++++++++++++++++++++--------------- 1 file changed, 50 insertions(+), 34 deletions(-) diff --git a/tools/scan-build/scan-build b/tools/scan-build/scan-build index 0e7dcc1f83..4b34256e18 100755 --- a/tools/scan-build/scan-build +++ b/tools/scan-build/scan-build @@ -1100,6 +1100,7 @@ sub RunBuildCommand { sub DisplayHelp { + my $ArgClangNotFoundErrMsg = shift; print < [build options] @@ -1348,6 +1349,12 @@ ENDTEXT } close PS; } + else { + print " *** Could not query Clang for the list of available checkers.\n"; + if (defined $ArgClangNotFoundErrMsg) { + print " *** Reason: $ArgClangNotFoundErrMsg\n"; + } + } print <