r254870 - Use llvm::make_range to reduce mentions of iterator type. NFC
Craig Topper via cfe-commits
cfe-commits at lists.llvm.org
Sat Dec 5 21:07:14 PST 2015
Author: ctopper
Date: Sat Dec 5 23:07:12 2015
New Revision: 254870
URL: http://llvm.org/viewvc/llvm-project?rev=254870&view=rev
Log:
Use llvm::make_range to reduce mentions of iterator type. NFC
Modified:
cfe/trunk/include/clang/AST/DeclBase.h
cfe/trunk/include/clang/AST/ExprCXX.h
cfe/trunk/lib/Serialization/ASTReaderDecl.cpp
cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp
Modified: cfe/trunk/include/clang/AST/DeclBase.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclBase.h?rev=254870&r1=254869&r2=254870&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclBase.h (original)
+++ cfe/trunk/include/clang/AST/DeclBase.h Sat Dec 5 23:07:12 2015
@@ -475,8 +475,7 @@ public:
template <typename T>
llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
- return llvm::iterator_range<specific_attr_iterator<T>>(
- specific_attr_begin<T>(), specific_attr_end<T>());
+ return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
}
template <typename T>
Modified: cfe/trunk/include/clang/AST/ExprCXX.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ExprCXX.h?rev=254870&r1=254869&r2=254870&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/ExprCXX.h (original)
+++ cfe/trunk/include/clang/AST/ExprCXX.h Sat Dec 5 23:07:12 2015
@@ -1596,14 +1596,12 @@ public:
/// \brief Retrieve the initialization expressions for this lambda's captures.
llvm::iterator_range<capture_init_iterator> capture_inits() {
- return llvm::iterator_range<capture_init_iterator>(capture_init_begin(),
- capture_init_end());
+ return llvm::make_range(capture_init_begin(), capture_init_end());
}
/// \brief Retrieve the initialization expressions for this lambda's captures.
llvm::iterator_range<const_capture_init_iterator> capture_inits() const {
- return llvm::iterator_range<const_capture_init_iterator>(
- capture_init_begin(), capture_init_end());
+ return llvm::make_range(capture_init_begin(), capture_init_end());
}
/// \brief Retrieve the first initialization argument for this
@@ -2519,7 +2517,7 @@ public:
return UnresolvedSetIterator(Results + NumResults);
}
llvm::iterator_range<decls_iterator> decls() const {
- return llvm::iterator_range<decls_iterator>(decls_begin(), decls_end());
+ return llvm::make_range(decls_begin(), decls_end());
}
/// \brief Gets the number of declarations in the unresolved set.
Modified: cfe/trunk/lib/Serialization/ASTReaderDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReaderDecl.cpp?rev=254870&r1=254869&r2=254870&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTReaderDecl.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReaderDecl.cpp Sat Dec 5 23:07:12 2015
@@ -412,9 +412,8 @@ public:
template<typename DeclT>
llvm::iterator_range<MergedRedeclIterator<DeclT>> merged_redecls(DeclT *D) {
- return llvm::iterator_range<MergedRedeclIterator<DeclT>>(
- MergedRedeclIterator<DeclT>(D),
- MergedRedeclIterator<DeclT>());
+ return llvm::make_range(MergedRedeclIterator<DeclT>(D),
+ MergedRedeclIterator<DeclT>());
}
uint64_t ASTDeclReader::GetCurrentCursorOffset() {
Modified: cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp?rev=254870&r1=254869&r2=254870&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp Sat Dec 5 23:07:12 2015
@@ -2712,8 +2712,7 @@ llvm::iterator_range<BugReport::ranges_i
if (Ranges.size() == 1 && !Ranges.begin()->isValid())
return llvm::make_range(ranges_iterator(), ranges_iterator());
- return llvm::iterator_range<BugReport::ranges_iterator>(Ranges.begin(),
- Ranges.end());
+ return llvm::make_range(Ranges.begin(), Ranges.end());
}
PathDiagnosticLocation BugReport::getLocation(const SourceManager &SM) const {
More information about the cfe-commits
mailing list