aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenAction.cpp
diff options
context:
space:
mode:
authorYaron Keren <yaron.keren@gmail.com>2015-08-01 19:11:36 +0000
committerYaron Keren <yaron.keren@gmail.com>2015-08-01 19:11:36 +0000
commitede603057ebaa4db7bf034f78e96a8bb4b7fe8a5 (patch)
tree9e763b9a34f034e742d0968b542ef04152d01d91 /clang/lib/CodeGen/CodeGenAction.cpp
parent9e1006d7853e4a4aabb5cfe0880d5026744781be (diff)
downloadllvm-ede603057ebaa4db7bf034f78e96a8bb4b7fe8a5.zip
llvm-ede603057ebaa4db7bf034f78e96a8bb4b7fe8a5.tar.gz
llvm-ede603057ebaa4db7bf034f78e96a8bb4b7fe8a5.tar.bz2
Rangify for loops, NFC.
llvm-svn: 243841
Diffstat (limited to 'clang/lib/CodeGen/CodeGenAction.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenAction.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp
index 0e7b6d8..8f5ee6f 100644
--- a/clang/lib/CodeGen/CodeGenAction.cpp
+++ b/clang/lib/CodeGen/CodeGenAction.cpp
@@ -333,8 +333,7 @@ void BackendConsumer::InlineAsmDiagHandler2(const llvm::SMDiagnostic &D,
DiagnosticBuilder B = Diags.Report(Loc, diag::note_fe_inline_asm_here);
// Convert the SMDiagnostic ranges into SourceRange and attach them
// to the diagnostic.
- for (unsigned i = 0, e = D.getRanges().size(); i != e; ++i) {
- std::pair<unsigned, unsigned> Range = D.getRanges()[i];
+ for (const std::pair<unsigned, unsigned> &Range : D.getRanges()) {
unsigned Column = D.getColumnNo();
B << SourceRange(Loc.getLocWithOffset(Range.first - Column),
Loc.getLocWithOffset(Range.second - Column));