[Analyzer] Add simple help to SATestAdd.py

Differential Revision: https://reviews.llvm.org/D38003

llvm-svn: 313924
This commit is contained in:
George Karpenkov 2017-09-21 21:47:33 +00:00
parent 7a256839d9
commit 2d155092cb
1 changed files with 6 additions and 5 deletions

View File

@ -90,11 +90,12 @@ def addNewProject(ID, BuildMode) :
# TODO: Add an option not to build.
# TODO: Set the path to the Repository directory.
if __name__ == '__main__':
if len(sys.argv) < 2:
print >> sys.stderr, 'Usage: ', sys.argv[0],\
'project_ID <mode>' \
'mode - 0 for single file project; ' \
'1 for scan_build; ' \
if len(sys.argv) < 2 or sys.argv[1] in ('-h', '--help'):
print >> sys.stderr, 'Add a new project for testing to static analyzer'\
'\nUsage: ', sys.argv[0],\
'project_ID <mode>\n' \
'mode: 0 for single file project, ' \
'1 for scan_build, ' \
'2 for single file c++11 project'
sys.exit(-1)