Add assertion to check for valid source ranges.

llvm-svn: 91966
This commit is contained in:
Ted Kremenek 2009-12-23 01:09:59 +00:00
parent b50c443df2
commit 1f76b51d3f
1 changed files with 4 additions and 1 deletions

View File

@ -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) {