diff options
| author | Kristof Umann <dkszelethus@gmail.com> | 2019-03-14 16:10:29 +0000 |
|---|---|---|
| committer | Kristof Umann <dkszelethus@gmail.com> | 2019-03-14 16:10:29 +0000 |
| commit | 4962816e7242b9cec7a1a1157e4efaac75a6120a (patch) | |
| tree | 2ddff6e82f79a0a6ef6901f2058909cad53bf67c /clang/test/Analysis/plist-html-macros.c | |
| parent | ac093d61c468b96f82d719f75e4dca8eab1e85cb (diff) | |
| download | bcm5719-llvm-4962816e7242b9cec7a1a1157e4efaac75a6120a.tar.gz bcm5719-llvm-4962816e7242b9cec7a1a1157e4efaac75a6120a.zip | |
[analyzer] Fix an assertation failure for invalid sourcelocation, add a new debug checker
For a rather short code snippet, if debug.ReportStmts (added in this patch) was
enabled, a bug reporter visitor crashed:
struct h {
operator int();
};
int k() {
return h();
}
Ultimately, this originated from PathDiagnosticLocation::createMemberLoc, as it
didn't handle the case where it's MemberExpr typed parameter returned and
invalid SourceLocation for MemberExpr::getMemberLoc. The solution was to find
any related valid SourceLocaion, and Stmt::getBeginLoc happens to be just that.
Differential Revision: https://reviews.llvm.org/D58777
llvm-svn: 356161
Diffstat (limited to 'clang/test/Analysis/plist-html-macros.c')
| -rw-r--r-- | clang/test/Analysis/plist-html-macros.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/test/Analysis/plist-html-macros.c b/clang/test/Analysis/plist-html-macros.c index c25346d99a6..0ac79be1b9c 100644 --- a/clang/test/Analysis/plist-html-macros.c +++ b/clang/test/Analysis/plist-html-macros.c @@ -3,7 +3,10 @@ // RUN: rm -rf %t.dir // RUN: mkdir -p %t.dir -// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output=plist-html -o %t.dir/index.plist %s +// +// RUN: %clang_analyze_cc1 -o %t.dir/index.plist %s \ +// RUN: -analyzer-checker=core -analyzer-output=plist-html +// // RUN: ls %t.dir | grep '\.html' | count 1 // RUN: grep '\.html' %t.dir/index.plist | count 1 |

