diff options
| author | Ted Kremenek <kremenek@apple.com> | 2009-12-23 01:09:59 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2009-12-23 01:09:59 +0000 |
| commit | 1f76b51d3fa553c49f76c536f5307b495f2b7189 (patch) | |
| tree | b0f1b5e3b8428c2910396225984070e98c07d462 /clang | |
| parent | b50c443df2921d84f4e831e977c18bb3ce4b0e2b (diff) | |
| download | bcm5719-llvm-1f76b51d3fa553c49f76c536f5307b495f2b7189.tar.gz bcm5719-llvm-1f76b51d3fa553c49f76c536f5307b495f2b7189.zip | |
Add assertion to check for valid source ranges.
llvm-svn: 91966
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/include/clang/Analysis/PathSensitive/BugReporter.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/include/clang/Analysis/PathSensitive/BugReporter.h b/clang/include/clang/Analysis/PathSensitive/BugReporter.h index 58c80185435..ccebf01b76a 100644 --- a/clang/include/clang/Analysis/PathSensitive/BugReporter.h +++ b/clang/include/clang/Analysis/PathSensitive/BugReporter.h @@ -203,7 +203,10 @@ public: ~RangedBugReport(); // FIXME: Move this out of line. - void addRange(SourceRange R) { Ranges.push_back(R); } + void addRange(SourceRange R) { + assert(R.isValid()); + Ranges.push_back(R); + } // FIXME: Move this out of line. void getRanges(const SourceRange*& beg, const SourceRange*& end) { |

