================ @@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -verify -DTEST_FUNC=__builtin_hlsl_or +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -verify -DTEST_FUNC=__builtin_hlsl_and + + ---------------- V-FEXrt wrote:
I'm not sure it is a good idea to DRY the test code here. Since test code isn't tested itself it should be immediately obvious what the test code is doing, and while its clever use use `-DTEST_FUNC` in the invocation its an extra level of indirection. Being clever is generally bad for code quality but its extra bad for test code Less important point: This breaks the convention that you can find an error test at `clang/test/SemaHLSL/BuiltIns/<intrinsic name>-errors.hlsl` which means just for `and`/`or` you have to know to look in a different location which make them harder to find if you've learned the pattern already The keyword to read about this idea/see other people's thoughts is DAMP https://stackoverflow.com/questions/6453235/what-does-damp-not-dry-mean-when-talking-about-unit-tests https://github.com/llvm/llvm-project/pull/128979 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits