[PATCH] D25939: PP: Replace some uses of unsigned with size_t
Benjamin Kramer via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 25 06:37:44 PDT 2016
bkramer added inline comments.
================
Comment at: lib/Lex/PPDirectives.cpp:804
if (LangOpts.MSVCCompat && !isAngled) {
- for (unsigned i = 0, e = IncludeMacroStack.size(); i != e; ++i) {
IncludeStackInfo &ISEntry = IncludeMacroStack[e - i - 1];
----------------
While there you could turn this into a for-range loop
```
for (IncludeStackInfo &ISEntry : llvm::reverse(IncludeMacroStack))
```
================
Comment at: lib/Lex/PPDirectives.cpp:868
- for (unsigned i = 0, e = IncludeMacroStack.size(); i != e; ++i) {
IncludeStackInfo &ISEntry = IncludeMacroStack[e-i-1];
----------------
Looks like another candidate for for-range.
https://reviews.llvm.org/D25939
More information about the cfe-commits
mailing list