Details
Diff Detail
- Repository
- rCTE Clang Tools Extra
- Build Status
Buildable 26778 Build 26777: arc lint + arc unit
Event Timeline
clangd/index/Background.cpp | ||
---|---|---|
521 | We should avoid modifying the container we're iterating over instead. We would pop() from the queue and push() to the result vector, therefore making bugs like this impossible. |
clangd/index/Background.cpp | ||
---|---|---|
488 | This reference makes it just as easy to access the vector we'll be modifying inside the loop. |
clangd/index/Background.cpp | ||
---|---|---|
488 | Ah, but we don't modify the vector anymore. |
LGTM, but please add a comment the vector is not modified (it might be useful as a reminder in case we want to change the code later)
This reference makes it just as easy to access the vector we'll be modifying inside the loop.
Can we avoid modifying the values inside the vector completely? I.e. ideally we'll have only push_back into the vector and no modifications of the internal references?