Merge 1abf935ae93424682685f7e0ea3d3d5841b338ce into 7140cd416cecd7462a8aae488024abeee55598e4

This commit is contained in:
AAMIR AKRAM 2026-06-02 21:56:23 -04:00 committed by GitHub
commit 832b81130e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6868,12 +6868,13 @@ void ParseGoogleTestFlagsOnlyImpl(int* argc, CharType** argv) {
LoadFlagsFromFile(flagfile_value);
remove_flag = true;
#endif // GTEST_USE_OWN_FLAGFILE_FLAG_ && GTEST_HAS_FILE_SYSTEM
} else if (arg_string == "--help" || HasGoogleTestFlagPrefix(arg)) {
} else if (arg_string == "--help" || HasGoogleTestFlagPrefix(arg)) {
// Both help flag and unrecognized Google Test flags (excluding
// internal ones) trigger help display.
g_help_flag = true;
remove_flag = true; // Ensure --help flag is consumed and removed from argv
}
if (remove_flag) {
// Shift the remainder of the argv list left by one.
for (int j = i + 1; j < *argc; ++j) {