diff options
author | Ted Kremenek <kremenek@apple.com> | 2012-02-14 02:43:12 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2012-02-14 02:43:12 +0000 |
commit | 6700d67925abd674ecddfc56948967f49b25bf39 (patch) | |
tree | 9a1c626e33ef1287ceac2283c9137500ca08ed4f | |
parent | eb273b798760ed960edb0a619092da314e21f4ea (diff) |
Add helper methods to StoredDiagnostic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150454 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Basic/Diagnostic.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/clang/Basic/Diagnostic.h b/include/clang/Basic/Diagnostic.h index 224f1a45d1..eb993a30e8 100644 --- a/include/clang/Basic/Diagnostic.h +++ b/include/clang/Basic/Diagnostic.h @@ -1057,11 +1057,20 @@ public: 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 |