[cfe-commits] r150454 - /cfe/trunk/include/clang/Basic/Diagnostic.h

Ted Kremenek kremenek at apple.com
Mon Feb 13 18:43:12 PST 2012


Author: kremenek
Date: Mon Feb 13 20:43:12 2012
New Revision: 150454

URL: http://llvm.org/viewvc/llvm-project?rev=150454&view=rev
Log:
Add helper methods to StoredDiagnostic.

Modified:
    cfe/trunk/include/clang/Basic/Diagnostic.h

Modified: cfe/trunk/include/clang/Basic/Diagnostic.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Diagnostic.h?rev=150454&r1=150453&r2=150454&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/Diagnostic.h (original)
+++ cfe/trunk/include/clang/Basic/Diagnostic.h Mon Feb 13 20:43:12 2012
@@ -1057,11 +1057,20 @@
   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





More information about the cfe-commits mailing list