summaryrefslogtreecommitdiff
path: root/absl/flags/parse.cc
diff options
context:
space:
mode:
Diffstat (limited to 'absl/flags/parse.cc')
-rw-r--r--absl/flags/parse.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/absl/flags/parse.cc b/absl/flags/parse.cc
index e2c88ff8..4f4bb3d5 100644
--- a/absl/flags/parse.cc
+++ b/absl/flags/parse.cc
@@ -729,12 +729,13 @@ std::vector<char*> ParseCommandLineImpl(int argc, char* argv[],
}
// 100. Set the located flag to a new new value, unless it is retired.
- // Setting retired flag fails, but we ignoring it here.
- if (flag->IsRetired()) continue;
-
+ // Setting retired flag fails, but we ignoring it here while also reporting
+ // access to retired flag.
std::string error;
if (!flags_internal::PrivateHandleAccessor::ParseFrom(
*flag, value, SET_FLAGS_VALUE, kCommandLine, error)) {
+ if (flag->IsRetired()) continue;
+
flags_internal::ReportUsageError(error, true);
success = false;
} else {