summaryrefslogtreecommitdiff
path: root/absl
diff options
context:
space:
mode:
authorGravatar Mark Barolak <mbar@google.com>2023-07-11 12:30:02 -0700
committerGravatar Copybara-Service <copybara-worker@google.com>2023-07-11 12:31:12 -0700
commit25800da2238f7bcd5cd272bbde9d6c8c8dbaf2f5 (patch)
tree8ecd6f8cab7f8922718184f5aa9fda75329d3e48 /absl
parentb2a6c1bca7e177cf033ebe2361e8f2d99fabf9a9 (diff)
Add a comment to absl/flags/parse.cc indicating that the flags defined there are not intended to be read or set from C++ code.
PiperOrigin-RevId: 547264846 Change-Id: Idd0958f308ec74f907c22cce965fac2e06692e2c
Diffstat (limited to 'absl')
-rw-r--r--absl/flags/parse.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/absl/flags/parse.cc b/absl/flags/parse.cc
index f41ddfcb..4cdd9d0a 100644
--- a/absl/flags/parse.cc
+++ b/absl/flags/parse.cc
@@ -99,6 +99,8 @@ struct SpecifiedFlagsCompare {
ABSL_NAMESPACE_END
} // namespace absl
+// These flags influence how command line flags are parsed and are only intended
+// to be set on the command line. Avoid reading or setting them from C++ code.
ABSL_FLAG(std::vector<std::string>, flagfile, {},
"comma-separated list of files to load flags from")
.OnUpdate([]() {
@@ -148,6 +150,8 @@ ABSL_FLAG(std::vector<std::string>, tryfromenv, {},
absl::flags_internal::tryfromenv_needs_processing = true;
});
+// Rather than reading or setting --undefok from C++ code, please consider using
+// ABSL_RETIRED_FLAG instead.
ABSL_FLAG(std::vector<std::string>, undefok, {},
"comma-separated list of flag names that it is okay to specify "
"on the command line even if the program does not define a flag "