diff --git a/SingleSource/Regression/DgOptions.txt b/SingleSource/Regression/DgOptions.txt index 935899dfcb..d0306834b6 100644 --- a/SingleSource/Regression/DgOptions.txt +++ b/SingleSource/Regression/DgOptions.txt @@ -222,7 +222,9 @@ function(gcc_torture_dg_options_cflags Variable DG_DO DG_SRC File) # Remove any flags that will make clang error if (DG_CFLAGS) - list(REMOVE_ITEM DG_CFLAGS ${CLANG_ERRORING_CFLAGS}) + foreach(ERROR_CFLAG ${CLANG_ERRORING_CFLAGS}) + list(FILTER DG_CFLAGS EXCLUDE REGEX "^${ERROR_CFLAG}.*") + endforeach() endif() # Set the parent scope variable