diff options
author | rsgowman <rgowman@google.com> | 2018-02-16 12:04:06 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-16 12:04:06 -0500 |
commit | aa6f1ae0993ed948fb0b39283561bb3321eea5e9 (patch) | |
tree | 356c219ceac511926c2a440d9497f6f02b5dd2f7 /Firestore/core/src/firebase/firestore/util | |
parent | ef55eeff4288404ed92d7a3455005aa153dd1eaf (diff) |
Disable -Wrange-loop-analysis for abseil (#807)
absl includes code like this:
```
void fn(std::initializer_list<absl::string_view> pieces) {
...
for (const absl::string_view piece : pieces) total_size += piece.size();
```
clang objects, suggesting that a reference should be used instead, i.e.:
```
for (const absl::string_view& piece : pieces) total_size += piece.size();
```
But:
a) we don't want to touch absl code
b) string_views are cheap to copy (and absl recommends copying
string_views rather than taking references as it may result in smaller
code)
c) some brief, naive benchmarking suggests there's no significant
different in this case (i.e. (b) is correct.)
Note that -Wrange-loop-analysis is already exlicitly enabled in our
cmake build.
Diffstat (limited to 'Firestore/core/src/firebase/firestore/util')
0 files changed, 0 insertions, 0 deletions