aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Analysis/PathSensitive/BugReporter.h
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-12-23 01:09:59 +0000
committerTed Kremenek <kremenek@apple.com>2009-12-23 01:09:59 +0000
commita5083e6ab51b031241152e81457240497ab9bff9 (patch)
tree7a89f916b35462ff20fd6c9cbaa6c1b5cdfa1ea1 /include/clang/Analysis/PathSensitive/BugReporter.h
parentbc12044215a6d0d77b5c6f09df34e8506a8d80e1 (diff)
Add assertion to check for valid source ranges.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91966 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Analysis/PathSensitive/BugReporter.h')
-rw-r--r--include/clang/Analysis/PathSensitive/BugReporter.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/clang/Analysis/PathSensitive/BugReporter.h b/include/clang/Analysis/PathSensitive/BugReporter.h
index 58c8018543..ccebf01b76 100644
--- a/include/clang/Analysis/PathSensitive/BugReporter.h
+++ b/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) {