File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -445,6 +445,7 @@ pub fn check(path: &Path, tidy_ctx: TidyCtx) {
445445 let mut comment_block: Option < ( usize , usize ) > = None ;
446446 let is_test = file. components ( ) . any ( |c| c. as_os_str ( ) == "tests" )
447447 || file. file_stem ( ) . unwrap ( ) == "tests" ;
448+ let is_codegen_test = is_test && file. components ( ) . any ( |c| c. as_os_str ( ) == "codegen-llvm" ) ;
448449 let is_this_file = file. ends_with ( this_file) || this_file. ends_with ( file) ;
449450 let is_test_for_this_file =
450451 is_test && file. parent ( ) . unwrap ( ) . ends_with ( this_file. with_extension ( "" ) ) ;
@@ -488,6 +489,11 @@ pub fn check(path: &Path, tidy_ctx: TidyCtx) {
488489 )
489490 }
490491
492+ if is_codegen_test && trimmed. contains ( "CHECK" ) && trimmed. ends_with ( ": br" ) {
493+ err ( "`CHECK: br` and `CHECK-NOT: br` in codegen tests are fragile to false \
494+ positives in mangled symbols. Try using `br {{.*}}` instead.")
495+ }
496+
491497 if !under_rustfmt
492498 && line. chars ( ) . count ( ) > max_columns
493499 && !long_line_is_ok ( & extension, is_error_code, max_columns, line)
You can’t perform that action at this time.
0 commit comments