From aa6f1ae0993ed948fb0b39283561bb3321eea5e9 Mon Sep 17 00:00:00 2001 From: rsgowman Date: Fri, 16 Feb 2018 12:04:06 -0500 Subject: Disable -Wrange-loop-analysis for abseil (#807) absl includes code like this: ``` void fn(std::initializer_list 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. --- FirebaseFirestore.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'FirebaseFirestore.podspec') diff --git a/FirebaseFirestore.podspec b/FirebaseFirestore.podspec index 7af3b77..094a2ba 100644 --- a/FirebaseFirestore.podspec +++ b/FirebaseFirestore.podspec @@ -90,6 +90,6 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling, ] ss.library = 'c++' - ss.compiler_flags = '$(inherited) ' + '-Wno-comma' + ss.compiler_flags = '$(inherited) ' + '-Wno-comma -Wno-range-loop-analysis' end end -- cgit v1.2.3