[cfe-commits] r91966 - /cfe/trunk/include/clang/Analysis/PathSensitive/BugReporter.h
Ted Kremenek
kremenek at apple.com
Tue Dec 22 17:09:59 PST 2009
Author: kremenek
Date: Tue Dec 22 19:09:59 2009
New Revision: 91966
URL: http://llvm.org/viewvc/llvm-project?rev=91966&view=rev
Log:
Add assertion to check for valid source ranges.
Modified:
cfe/trunk/include/clang/Analysis/PathSensitive/BugReporter.h
Modified: cfe/trunk/include/clang/Analysis/PathSensitive/BugReporter.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/PathSensitive/BugReporter.h?rev=91966&r1=91965&r2=91966&view=diff
==============================================================================
--- cfe/trunk/include/clang/Analysis/PathSensitive/BugReporter.h (original)
+++ cfe/trunk/include/clang/Analysis/PathSensitive/BugReporter.h Tue Dec 22 19:09:59 2009
@@ -203,7 +203,10 @@
~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) {
More information about the cfe-commits
mailing list