@@ -120,12 +120,11 @@ def find_groups(options_dictionary, option):
120120 Return: A set including the group found for the option
121121 """
122122 group_list = options_dictionary [option ]["Group" ]
123- group_set = set ()
124123
125124 if group_list is None :
126125 return None
127126 found_group = group_list ["def" ]
128- group_set . add ( found_group )
127+ group_set = { found_group }
129128
130129 sub_group_set = find_groups (options_dictionary , found_group )
131130 if sub_group_set is None :
@@ -169,7 +168,7 @@ def get_lit_test_note(test_visibility):
169168 f"{ test_prefix } NOTE: To make changes, see llvm-project/clang/utils/generate_unsupported_in_drivermode.py"
170169 + " from which it was generated.\n "
171170 f"{ test_prefix } NOTE: Regenerate this Lit test with the following:\n "
172- f"{ test_prefix } NOTE: python llvm-project/clang/utils/ generate_unsupported_in_drivermode.py "
171+ f"{ test_prefix } NOTE: python generate_unsupported_in_drivermode.py "
173172 + "llvm-project/clang/include/clang/Driver/Options.td --llvm-bin llvm-project/build/bin --llvm-tblgen llvm-tblgen\n \n "
174173 )
175174
@@ -371,7 +370,7 @@ def validate_file(path):
371370# Iterate the options list and find which drivers shouldn't be visible to each option
372371for option in options_dictionary ["!instanceof" ]["Option" ]:
373372 kind = options_dictionary [option ]["Kind" ]["def" ]
374- tmp_visibility_set = set ()
373+ tmp_visibility_set = set (() )
375374 option_name = options_dictionary [option ]["Name" ]
376375
377376 # There are a few conditions that make an option unsuitable to test in this script
@@ -432,9 +431,9 @@ def validate_file(path):
432431 driver_data .supported_sequence .sort (key = len , reverse = True )
433432
434433# For a given driver, this script cannot generate tests for unsupported options whose option "Name" have a prefix that
435- # corresponds to a supported option / visible option of Kind *JOINED*. These driver-option pairs are removed here.
434+ # corresponds to a supported/ visible option of Kind *JOINED*. These driver-option pairs are removed here.
436435# The reason is that those options will be parsed as if they were the corresponding prefixed options with a value,
437- # and thus would not error would be triggered.
436+ # and thus no error would be triggered.
438437# Example: Option "O_flag" is not visible to FlangOption, but option "O" is visible to FlangOption.
439438# Attempting to test this:
440439# clang --driver-mode=flang -O_flag -### -x c++ -c - < /dev/null 2>&1
0 commit comments