This is an archive of the discontinued LLVM Phabricator instance.

Forbid combination of --status-bugs and non-HTML output
Needs ReviewPublic

Authored by rkday on Jan 7 2019, 1:56 PM.

Details

Reviewers
dcoughlin
Summary

I recently spent some time resolving an issue where the --status-bugs parameter conflicted with -plist, and scan-build always returned 0 even when there were errors.

This change means that scan-build rejects these as incompatible arguments.

I've tested that this works with this test program:

$ cat test.c
int abcd(char* x, char* y)
{
	strcpy(x, y);
}

int main()
{
	return 0;
}

and these two commands:

./bin/scan-build --status-bugs -enable-checker security --use-analyzer /usr/bin/clang clang test.c; echo $?
./bin/scan-build --status-bugs -plist -enable-checker security --use-analyzer /usr/bin/clang clang test.c; echo $?

Diff Detail

Repository
rC Clang

Event Timeline

rkday created this revision.Jan 7 2019, 1:56 PM