teak-llvm/clang/test/Analysis/html_diagnostics/relevant_lines/objcmethods.m
George Karpenkov a5ddd3cacb [analyzer] support a mode to only show relevant lines in HTML diagnostics
HTML diagnostics can be an overwhelming blob of pages of code.
This patch adds a checkbox which filters this list down to only the
lines *relevant* to the counterexample by e.g. skipping branches which
analyzer has assumed to be infeasible at a time.

The resulting amount of output is much smaller, and often fits on one
screen, and also provides a much more readable diagnostics.

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

llvm-svn: 322612
2018-01-17 02:59:11 +00:00

20 lines
415 B
Objective-C

@interface I
- (int)func;
@end
@implementation I
- (int)func:(int *)param {
return *param;
}
@end
void foo(I *i) {
int *x = 0;
[i func:x];
}
// RUN: rm -rf %t.output
// RUN: %clang_analyze_cc1 -analyze -analyzer-checker=core -analyzer-output html -o %t.output -Wno-objc-root-class %s
// RUN: cat %t.output/* | FileCheck %s
// CHECK: var relevant_lines = {"1": {"6": 1, "7": 1, "11": 1, "12": 1, "13": 1}};