Skip to content

Commit 196fdf2

Browse files
authored
cleanup(otel): silence clang-tidy in C++20 mode (#13010)
As I write more tests and examples in C++20 code in headers gets examined by `clang-tidy` in C++20 mode. In this case, `clang-tidy` would like us to use C++20 ranges to perform a reverse iteration.
1 parent 364054f commit 196fdf2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

google/cloud/internal/opentelemetry_context.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ class ScopedOTelContext {
109109

110110
~ScopedOTelContext() {
111111
if (noop_) return;
112+
// NOLINTNEXTLINE(modernize-loop-convert)
112113
for (auto it = contexts_.rbegin(); it != contexts_.rend(); ++it) {
113114
DetachOTelContext(*it);
114115
}

0 commit comments

Comments
 (0)