Thank you!

On 02.05.2016 06:40, Justin Bogner wrote:
Igor Kudrin <ikudrin....@gmail.com> writes:
+ /// \brief Check whether a region with bounds \c StartLoc and \c EndLoc
+  /// is already added to \c SourceRegions.
+  bool isRegionAlreadyAdded(SourceLocation StartLoc, SourceLocation EndLoc) {
+    return SourceRegions.rend() !=
+           std::find_if(SourceRegions.rbegin(), SourceRegions.rend(),
Any particular reason for rbegin/rend? I guess you expect the match to
be near the end of the list when it exists?

Yes, exactly. I suppose that if that region exists, it's probably added recently.
+                        [=](const SourceMappingRegion &Region) {
There's no good reason to capture by value here. Best to use [&] for
efficiency.

OK.

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to