We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2804b2c commit 895f1d9Copy full SHA for 895f1d9
llvm/utils/UpdateTestChecks/common.py
@@ -2280,9 +2280,12 @@ def add_checks(
2280
# For IR output, change all defs to FileCheck variables, so we're immune
2281
# to variable naming fashions.
2282
else:
2283
- blank_line_indices = {
2284
- i for i, line in enumerate(func_body) if line.strip() == ""
2285
- } if ginfo.get_version() >= 7 else set()
+ if ginfo.get_version() >= 7:
+ # Record the indices of blank lines in the function body preemptively.
+ blank_line_indices = { i for i, line in enumerate(func_body) if line.strip() == "" }
2286
+ else:
2287
+ blank_line_indices = set()
2288
+
2289
func_body = generalize_check_lines(
2290
func_body,
2291
ginfo,
0 commit comments