Skip to content

Commit

Permalink
Add helper methods to StoredDiagnostic.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150454 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
tkremenek committed Feb 14, 2012
1 parent eb273b7 commit 6700d67
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions include/clang/Basic/Diagnostic.h
Original file line number Diff line number Diff line change
Expand Up @@ -1057,11 +1057,20 @@ class StoredDiagnostic {
range_iterator range_begin() const { return Ranges.begin(); }
range_iterator range_end() const { return Ranges.end(); }
unsigned range_size() const { return Ranges.size(); }

ArrayRef<CharSourceRange> getRanges() const {
return llvm::makeArrayRef(Ranges);
}


typedef std::vector<FixItHint>::const_iterator fixit_iterator;
fixit_iterator fixit_begin() const { return FixIts.begin(); }
fixit_iterator fixit_end() const { return FixIts.end(); }
unsigned fixit_size() const { return FixIts.size(); }

ArrayRef<FixItHint> getFixIts() const {
return llvm::makeArrayRef(FixIts);
}
};

/// DiagnosticConsumer - This is an abstract interface implemented by clients of
Expand Down

0 comments on commit 6700d67

Please sign in to comment.