Make package lifetime_annotations compile under macOS.

Specifically, this is with the Blaze options

  --config=darwin_x86_64 --macos_minimum_os=10.14

This is needed to unblock integrating package lifetime_analysis into clang_tidy
(see unknown commit and presubmit failures there).

PiperOrigin-RevId: 415477220
diff --git a/lifetime_annotations/lifetime_annotations_test.cc b/lifetime_annotations/lifetime_annotations_test.cc
index 52eca48..610b020 100644
--- a/lifetime_annotations/lifetime_annotations_test.cc
+++ b/lifetime_annotations/lifetime_annotations_test.cc
@@ -37,7 +37,7 @@
           clang::tooling::FileContentMappings()) {
     absl::StatusOr<NamedFuncLifetimes> result;
     runOnCodeWithLifetimeHandlers(
-        code,
+        llvm::StringRef(code.data(), code.size()),
         [&result](clang::ASTContext& ast_context,
                   const LifetimeAnnotationContext& lifetime_context) {
           using clang::ast_matchers::findAll;