diff --git a/CMakeLists.txt b/CMakeLists.txt index ca3d4b80665..b8b1645ef08 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -111,7 +111,7 @@ option( option(SLANG_ENABLE_DXIL "Enable generating DXIL with DXC" ON) option(SLANG_ENABLE_FULL_IR_VALIDATION "Enable full IR validation (SLOW!)") -option(SLANG_ENABLE_IR_BREAK_ALLOC, "Enable _debugUID on IR allocation") +option(SLANG_ENABLE_IR_BREAK_ALLOC "Enable _debugUID on IR allocation") option(SLANG_ENABLE_ASAN "Enable ASAN (address sanitizer)") option(SLANG_ENABLE_PREBUILT_BINARIES "Enable using prebuilt binaries" ON) diff --git a/source/slang/slang-emit.cpp b/source/slang/slang-emit.cpp index c0c1ba75a60..f4d535466b4 100644 --- a/source/slang/slang-emit.cpp +++ b/source/slang/slang-emit.cpp @@ -950,9 +950,10 @@ Result linkAndOptimizeIR( if (requiredLoweringPassSet.autodiff) { dumpIRIfEnabled(codeGenContext, irModule, "BEFORE-AUTODIFF"); - enableIRValidationAtInsert(); - changed |= processAutodiffCalls(targetProgram, irModule, sink); - disableIRValidationAtInsert(); + { + auto validationScope = enableIRValidationScope(); + changed |= processAutodiffCalls(targetProgram, irModule, sink); + } dumpIRIfEnabled(codeGenContext, irModule, "AFTER-AUTODIFF"); } diff --git a/source/slang/slang-ir-autodiff-cfg-norm.cpp b/source/slang/slang-ir-autodiff-cfg-norm.cpp index 30e832719e6..720fdece201 100644 --- a/source/slang/slang-ir-autodiff-cfg-norm.cpp +++ b/source/slang/slang-ir-autodiff-cfg-norm.cpp @@ -755,9 +755,10 @@ void normalizeCFG( sortBlocksInFunc(func); legalizeDefUse(func); - disableIRValidationAtInsert(); - constructSSA(module, func); - enableIRValidationAtInsert(); + { + auto validationScope = disableIRValidationScope(); + constructSSA(module, func); + } module->invalidateAnalysisForInst(func); #if _DEBUG diff --git a/source/slang/slang-ir-autodiff-fwd.cpp b/source/slang/slang-ir-autodiff-fwd.cpp index 00379079336..a2ee2bdf9ce 100644 --- a/source/slang/slang-ir-autodiff-fwd.cpp +++ b/source/slang/slang-ir-autodiff-fwd.cpp @@ -1900,12 +1900,11 @@ SlangResult ForwardDiffTranscriber::prepareFuncForForwardDiff(IRFunc* func) if (SLANG_SUCCEEDED(result)) { - disableIRValidationAtInsert(); + auto validationScope = disableIRValidationScope(); auto simplifyOptions = IRSimplificationOptions::getDefault(nullptr); simplifyOptions.removeRedundancy = true; simplifyOptions.hoistLoopInvariantInsts = true; simplifyFunc(autoDiffSharedContext->targetProgram, func, simplifyOptions); - enableIRValidationAtInsert(); } return result; } diff --git a/source/slang/slang-ir-autodiff-unzip.h b/source/slang/slang-ir-autodiff-unzip.h index ec435ee8733..80b2038aa6d 100644 --- a/source/slang/slang-ir-autodiff-unzip.h +++ b/source/slang/slang-ir-autodiff-unzip.h @@ -436,9 +436,8 @@ struct DiffUnzipPass if (intermediateVar) { - disableIRValidationAtInsert(); + auto validationScope = disableIRValidationScope(); diffBuilder->addBackwardDerivativePrimalContextDecoration(callInst, intermediateVar); - enableIRValidationAtInsert(); } IRInst* diffVal = nullptr; diff --git a/source/slang/slang-ir-validate.cpp b/source/slang/slang-ir-validate.cpp index 565ae97d8cf..b3d6504ab62 100644 --- a/source/slang/slang-ir-validate.cpp +++ b/source/slang/slang-ir-validate.cpp @@ -273,14 +273,19 @@ void validateIRInstOperands(IRValidateContext* context, IRInst* inst) } static thread_local bool _enableIRValidationAtInsert = false; -void disableIRValidationAtInsert() + +// RAII class implementation for exception-safe IR validation state management +IRValidationScope::IRValidationScope(bool enableValidation) + : m_previousState(_enableIRValidationAtInsert) { - _enableIRValidationAtInsert = false; + _enableIRValidationAtInsert = enableValidation; } -void enableIRValidationAtInsert() + +IRValidationScope::~IRValidationScope() { - _enableIRValidationAtInsert = true; + _enableIRValidationAtInsert = m_previousState; } + void validateIRInstOperands(IRInst* inst) { if (!_enableIRValidationAtInsert) diff --git a/source/slang/slang-ir-validate.h b/source/slang/slang-ir-validate.h index 72235945220..7fc882f3722 100644 --- a/source/slang/slang-ir-validate.h +++ b/source/slang/slang-ir-validate.h @@ -36,8 +36,38 @@ void validateIRModuleIfEnabled(CompileRequestBase* compileRequest, IRModule* mod void validateIRModuleIfEnabled(CodeGenContext* codeGenContext, IRModule* module); -void disableIRValidationAtInsert(); -void enableIRValidationAtInsert(); +// RAII class to manage IR validation state in an exception-safe manner +class [[nodiscard]] IRValidationScope +{ +public: + // Constructor saves current state and sets new state + explicit IRValidationScope(bool enableValidation); + + // Destructor automatically restores previous state + ~IRValidationScope(); + + // Non-copyable to prevent accidental copies + IRValidationScope(const IRValidationScope&) = delete; + IRValidationScope& operator=(const IRValidationScope&) = delete; + + // Non-movable to keep it simple + IRValidationScope(IRValidationScope&&) = delete; + IRValidationScope& operator=(IRValidationScope&&) = delete; + +private: + bool m_previousState; +}; + +// Convenience functions to create scoped guards +[[nodiscard]] inline IRValidationScope enableIRValidationScope() +{ + return IRValidationScope(true); +} + +[[nodiscard]] inline IRValidationScope disableIRValidationScope() +{ + return IRValidationScope(false); +} // Validate that the destination of an atomic operation is appropriate, meaning it's // either 'groupshared' or in a device buffer. diff --git a/tests/bugs/import-with-error.slang b/tests/bugs/import-with-error.slang index 1013de37c12..e54f9e7271d 100644 --- a/tests/bugs/import-with-error.slang +++ b/tests/bugs/import-with-error.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST:SIMPLE: +//TEST:SIMPLE: // Confirm that we correctly issue a diagnostic when // we `import` a module that has some errors in it. diff --git a/tests/diagnostics/missing-return-target.slang b/tests/diagnostics/missing-return-target.slang index fba1b908982..8fc65efd104 100644 --- a/tests/diagnostics/missing-return-target.slang +++ b/tests/diagnostics/missing-return-target.slang @@ -1,12 +1,12 @@ -//DISABLE_DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_NOT_SUPP): -entry computeMain -stage compute -target spirv -//DISABLE_DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_NOT_SUPP): -entry computeMain -stage compute -target glsl -//DISABLE_DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_NOT_SUPP): -entry computeMain -stage compute -target wgsl +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_NOT_SUPP): -entry computeMain -stage compute -target spirv +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_NOT_SUPP): -entry computeMain -stage compute -target glsl +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_NOT_SUPP): -entry computeMain -stage compute -target wgsl -//DISABLE_DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_SUPP): -//DISABLE_DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_SUPP): -entry computeMain -stage compute -target hlsl -//DISABLE_DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_SUPP): -entry computeMain -stage compute -target metal -//DISABLE_DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_SUPP): -entry computeMain -stage compute -target cpp -//DISABLE_DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_SUPP): -entry computeMain -stage compute -target cuda +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_SUPP): +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_SUPP): -entry computeMain -stage compute -target hlsl +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_SUPP): -entry computeMain -stage compute -target metal +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_SUPP): -entry computeMain -stage compute -target cpp +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_SUPP): -entry computeMain -stage compute -target cuda // Some compilation targets allow missing returns while some do not. // This test ensures that either errors and warnings are emitted appropriately. diff --git a/tests/diagnostics/recursive-import.slang b/tests/diagnostics/recursive-import.slang index 017e2a2fc63..312c579cff0 100644 --- a/tests/diagnostics/recursive-import.slang +++ b/tests/diagnostics/recursive-import.slang @@ -1,4 +1,4 @@ -//DISABLE_DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): // A file that recursively imports itself // (including transitive cases) should be diagnosed. diff --git a/tests/diagnostics/unbound-loop.slang b/tests/diagnostics/unbound-loop.slang index c0e67d9d415..5e85c3c66d0 100644 --- a/tests/diagnostics/unbound-loop.slang +++ b/tests/diagnostics/unbound-loop.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST:SIMPLE(filecheck=CHECK): -entry computeMain -target hlsl -profile cs_6_5 +//TEST:SIMPLE(filecheck=CHECK): -entry computeMain -target hlsl -profile cs_6_5 RWStructuredBuffer outputBuffer; @@ -40,4 +40,4 @@ void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) __bwd_diff(test_loop_with_continue)(dpa, 1.0f); outputBuffer[1] = dpa.d; // Expect: 0.0131072 } -} +} \ No newline at end of file diff --git a/tests/diagnostics/uninitialized-resource-type.slang b/tests/diagnostics/uninitialized-resource-type.slang index 5763a1abd7a..4d5b8f5b3b3 100644 --- a/tests/diagnostics/uninitialized-resource-type.slang +++ b/tests/diagnostics/uninitialized-resource-type.slang @@ -1,5 +1,5 @@ -//DISABLE_DIAGNOSTIC_TEST:SIMPLE: -target hlsl -DTEST_1 -//DISABLE_DIAGNOSTIC_TEST:SIMPLE: -target hlsl -DTEST_2 +//DIAGNOSTIC_TEST:SIMPLE: -target hlsl -DTEST_1 +//DIAGNOSTIC_TEST:SIMPLE: -target hlsl -DTEST_2 SamplerState sampler; diff --git a/tests/glsl-intrinsic/shader-subgroup/shader-subgroup-arithmetic_Exclusive.slang b/tests/glsl-intrinsic/shader-subgroup/shader-subgroup-arithmetic_Exclusive.slang index 3ed66b9bf14..b7e98cffcff 100644 --- a/tests/glsl-intrinsic/shader-subgroup/shader-subgroup-arithmetic_Exclusive.slang +++ b/tests/glsl-intrinsic/shader-subgroup/shader-subgroup-arithmetic_Exclusive.slang @@ -1,14 +1,14 @@ -//DISABLE_TEST:SIMPLE(filecheck=CHECK_GLSL): -allow-glsl -stage compute -entry computeMain -target glsl -DTARGET_GLSL -//DISABLE_TEST:SIMPLE(filecheck=CHECK_SPV): -allow-glsl -stage compute -entry computeMain -target spirv -emit-spirv-directly -DTARGET_SPIRV -//DISABLE_TEST:SIMPLE(filecheck=CHECK_HLSL): -allow-glsl -stage compute -entry computeMain -target hlsl -DTARGET_HLSL -//DISABLE_TEST:SIMPLE(filecheck=CHECK_CUDA): -allow-glsl -stage compute -entry computeMain -target cuda -DTARGET_CUDA +//TEST:SIMPLE(filecheck=CHECK_GLSL): -allow-glsl -stage compute -entry computeMain -target glsl -DTARGET_GLSL +//TEST:SIMPLE(filecheck=CHECK_SPV): -allow-glsl -stage compute -entry computeMain -target spirv -emit-spirv-directly -DTARGET_SPIRV +//TEST:SIMPLE(filecheck=CHECK_HLSL): -allow-glsl -stage compute -entry computeMain -target hlsl -DTARGET_HLSL +//TEST:SIMPLE(filecheck=CHECK_CUDA): -allow-glsl -stage compute -entry computeMain -target cuda -DTARGET_CUDA // not testing cpp due to missing impl //DISABLE_TEST:SIMPLE(filecheck=CHECK_CPP): -allow-glsl -stage compute -entry computeMain -target cpp -DTARGET_CPP -//DISABLE_TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain -allow-glsl -//DISABLE_TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain -allow-glsl -emit-spirv-directly -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=BUF):-wgpu -compute -entry computeMain -allow-glsl -xslang -DWGPU -render-feature half +//TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain -allow-glsl +//TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain -allow-glsl -emit-spirv-directly +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=BUF):-wgpu -compute -entry computeMain -allow-glsl -xslang -DWGPU -render-feature half // Not testing because CI runners may not support Metal's intrinsics. //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=BUF):-metal -compute -entry computeMain -allow-glsl -xslang -DMETAL diff --git a/tests/glsl-intrinsic/shader-subgroup/shader-subgroup-arithmetic_Inclusive.slang b/tests/glsl-intrinsic/shader-subgroup/shader-subgroup-arithmetic_Inclusive.slang index ee228e5667c..40f77ee61d1 100644 --- a/tests/glsl-intrinsic/shader-subgroup/shader-subgroup-arithmetic_Inclusive.slang +++ b/tests/glsl-intrinsic/shader-subgroup/shader-subgroup-arithmetic_Inclusive.slang @@ -1,14 +1,14 @@ -//DISABLE_TEST:SIMPLE(filecheck=CHECK_GLSL): -allow-glsl -stage compute -entry computeMain -target glsl -DTARGET_GLSL -//DISABLE_TEST:SIMPLE(filecheck=CHECK_SPV): -allow-glsl -stage compute -entry computeMain -target spirv -emit-spirv-directly -DTARGET_SPIRV -//DISABLE_TEST:SIMPLE(filecheck=CHECK_HLSL): -allow-glsl -stage compute -entry computeMain -target hlsl -DTARGET_HLSL -//DISABLE_TEST:SIMPLE(filecheck=CHECK_CUDA): -allow-glsl -stage compute -entry computeMain -target cuda -DTARGET_CUDA +//TEST:SIMPLE(filecheck=CHECK_GLSL): -allow-glsl -stage compute -entry computeMain -target glsl -DTARGET_GLSL +//TEST:SIMPLE(filecheck=CHECK_SPV): -allow-glsl -stage compute -entry computeMain -target spirv -emit-spirv-directly -DTARGET_SPIRV +//TEST:SIMPLE(filecheck=CHECK_HLSL): -allow-glsl -stage compute -entry computeMain -target hlsl -DTARGET_HLSL +//TEST:SIMPLE(filecheck=CHECK_CUDA): -allow-glsl -stage compute -entry computeMain -target cuda -DTARGET_CUDA // not testing cpp due to missing impl //DISABLE_TEST:SIMPLE(filecheck=CHECK_CPP): -allow-glsl -stage compute -entry computeMain -target cpp -DTARGET_CPP -//DISABLE_TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain -allow-glsl -//DISABLE_TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain -allow-glsl -emit-spirv-directly -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=BUF):-wgpu -compute -entry computeMain -allow-glsl -xslang -DWGPU +//TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain -allow-glsl +//TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain -allow-glsl -emit-spirv-directly +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=BUF):-wgpu -compute -entry computeMain -allow-glsl -xslang -DWGPU // Not testing because CI runners may not support Metal's intrinsics. //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=BUF):-metal -compute -entry computeMain -allow-glsl -xslang -DMETAL diff --git a/tests/glsl-intrinsic/shader-subgroup/shader-subgroup-arithmetic_None.slang b/tests/glsl-intrinsic/shader-subgroup/shader-subgroup-arithmetic_None.slang index 16c4b245446..d676e7b2264 100644 --- a/tests/glsl-intrinsic/shader-subgroup/shader-subgroup-arithmetic_None.slang +++ b/tests/glsl-intrinsic/shader-subgroup/shader-subgroup-arithmetic_None.slang @@ -1,14 +1,14 @@ -//DISABLE_TEST:SIMPLE(filecheck=CHECK_GLSL): -allow-glsl -stage compute -entry computeMain -target glsl -DTARGET_GLSL -//DISABLE_TEST:SIMPLE(filecheck=CHECK_SPV): -allow-glsl -stage compute -entry computeMain -target spirv -emit-spirv-directly -DTARGET_SPIRV -//DISABLE_TEST:SIMPLE(filecheck=CHECK_HLSL): -allow-glsl -stage compute -entry computeMain -target hlsl -DTARGET_HLSL -//DISABLE_TEST:SIMPLE(filecheck=CHECK_CUDA): -allow-glsl -stage compute -entry computeMain -target cuda -DTARGET_CUDA +//TEST:SIMPLE(filecheck=CHECK_GLSL): -allow-glsl -stage compute -entry computeMain -target glsl -DTARGET_GLSL +//TEST:SIMPLE(filecheck=CHECK_SPV): -allow-glsl -stage compute -entry computeMain -target spirv -emit-spirv-directly -DTARGET_SPIRV +//TEST:SIMPLE(filecheck=CHECK_HLSL): -allow-glsl -stage compute -entry computeMain -target hlsl -DTARGET_HLSL +//TEST:SIMPLE(filecheck=CHECK_CUDA): -allow-glsl -stage compute -entry computeMain -target cuda -DTARGET_CUDA // not testing cpp due to missing impl //DISABLE_TEST:SIMPLE(filecheck=CHECK_CPP): -allow-glsl -stage compute -entry computeMain -target cpp -DTARGET_CPP -//DISABLE_TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain -allow-glsl -//DISABLE_TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain -allow-glsl -emit-spirv-directly -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=BUF):-wgpu -compute -entry computeMain -allow-glsl -xslang -DWGPU -render-feature half +//TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain -allow-glsl +//TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain -allow-glsl -emit-spirv-directly +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=BUF):-wgpu -compute -entry computeMain -allow-glsl -xslang -DWGPU -render-feature half // Not testing because CI runners may not support Metal's intrinsics. //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=BUF):-metal -compute -entry computeMain -allow-glsl -xslang -DMETAL diff --git a/tests/ir/dump-module.slang b/tests/ir/dump-module.slang index 41576f5aaf8..e22c3fca5de 100644 --- a/tests/ir/dump-module.slang +++ b/tests/ir/dump-module.slang @@ -4,10 +4,10 @@ // is to see the file you requested. If there's a bug in slang-module output, it's // important that -dump-module looks at the specific file you requested. -//DISABLE_TEST:COMPILE: tests/ir/dump-module.slang -o tests/ir/dump-module.slang-module -target spirv -embed-downstream-ir +//TEST:COMPILE: tests/ir/dump-module.slang -o tests/ir/dump-module.slang-module -target spirv -embed-downstream-ir -//DISABLE_TEST:SIMPLE(filecheck=CHECK1): -dump-module tests/ir/dump-module.slang-module -//DISABLE_TEST:SIMPLE(filecheck=CHECK2): -dump-module tests/ir/dump-module.slang +//TEST:SIMPLE(filecheck=CHECK1): -dump-module tests/ir/dump-module.slang-module +//TEST:SIMPLE(filecheck=CHECK2): -dump-module tests/ir/dump-module.slang module "export-library-generics"; diff --git a/tests/language-feature/modules/error-in-nested-import/error-in-nested-import.slang b/tests/language-feature/modules/error-in-nested-import/error-in-nested-import.slang index 76aae57bac5..b709b52b1c3 100644 --- a/tests/language-feature/modules/error-in-nested-import/error-in-nested-import.slang +++ b/tests/language-feature/modules/error-in-nested-import/error-in-nested-import.slang @@ -1,8 +1,8 @@ // error-in-nested-import.slang -//DISABLE_DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): // CHECK: ([[#@LINE+1]]): error import a; int main() -{} +{} \ No newline at end of file diff --git a/tests/language-server/robustness-2.slang b/tests/language-server/robustness-2.slang index be488febaea..bd73d25ed8c 100644 --- a/tests/language-server/robustness-2.slang +++ b/tests/language-server/robustness-2.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST:LANG_SERVER: +//TEST:LANG_SERVER: // // tests broken generic parameter. diff --git a/tests/language-server/robustness-3.slang b/tests/language-server/robustness-3.slang index 4f9c379da02..29835eb7068 100644 --- a/tests/language-server/robustness-3.slang +++ b/tests/language-server/robustness-3.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST:LANG_SERVER: +//TEST:LANG_SERVER: // // tests broken subscript decl. //HOVER:7,24 diff --git a/tests/language-server/robustness-4.slang b/tests/language-server/robustness-4.slang index 39177dbef43..d1f110f5c6d 100644 --- a/tests/language-server/robustness-4.slang +++ b/tests/language-server/robustness-4.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST:LANG_SERVER: +//TEST:LANG_SERVER: // //Broken syntax //HOVER:1,1 diff --git a/tests/language-server/robustness-5.slang b/tests/language-server/robustness-5.slang index 9d53d3f3818..a2d54b39863 100644 --- a/tests/language-server/robustness-5.slang +++ b/tests/language-server/robustness-5.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST:LANG_SERVER: +//TEST:LANG_SERVER: // //Broken syntax //HOVER:9,11 @@ -10,4 +10,4 @@ struct MyStruct { int a = 5; -} +} \ No newline at end of file diff --git a/tests/language-server/robustness-6.slang b/tests/language-server/robustness-6.slang index 89e9768f5af..ef5924cf39b 100644 --- a/tests/language-server/robustness-6.slang +++ b/tests/language-server/robustness-6.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST:LANG_SERVER: +//TEST:LANG_SERVER: //HOVER:4,8 float dsqr extension T { // CHECK: null //HOVER:7,32 __init(StructuredBuffer) {} -} +} \ No newline at end of file diff --git a/tests/language-server/scalar-member.slang b/tests/language-server/scalar-member.slang index 369bdc7064a..6b12ab8976a 100644 --- a/tests/language-server/scalar-member.slang +++ b/tests/language-server/scalar-member.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST:LANG_SERVER(filecheck=CHECK): +//TEST:LANG_SERVER(filecheck=CHECK): void f() { float v; @@ -6,4 +6,4 @@ void f() v. } -// CHECK: x +// CHECK: x \ No newline at end of file diff --git a/tests/language-server/smoke.slang b/tests/language-server/smoke.slang index 6222847ebc3..19490258665 100644 --- a/tests/language-server/smoke.slang +++ b/tests/language-server/smoke.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(smoke):LANG_SERVER: +//TEST(smoke):LANG_SERVER: //COMPLETE:31,21 //HOVER:25,30 //SIGNATURE:25,40 diff --git a/tests/language-server/this-type-hover.slang b/tests/language-server/this-type-hover.slang index 230d8a59fb7..535e04e9354 100644 --- a/tests/language-server/this-type-hover.slang +++ b/tests/language-server/this-type-hover.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST:LANG_SERVER(filecheck=CHECK): +//TEST:LANG_SERVER(filecheck=CHECK): struct G {} diff --git a/tests/language-server/typename-enum-intval.slang b/tests/language-server/typename-enum-intval.slang index 31e35d9a732..9eca71ae27b 100644 --- a/tests/language-server/typename-enum-intval.slang +++ b/tests/language-server/typename-enum-intval.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST:LANG_SERVER(filecheck=CHECK): +//TEST:LANG_SERVER(filecheck=CHECK): namespace ns { enum Test : uint32_t @@ -21,4 +21,4 @@ void f() } // CHECK: ns.Foo -// CHECK: ns.Foo +// CHECK: ns.Foo \ No newline at end of file diff --git a/tests/language-server/vector-member.slang b/tests/language-server/vector-member.slang index 78a8a884dd8..341544ac099 100644 --- a/tests/language-server/vector-member.slang +++ b/tests/language-server/vector-member.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST:LANG_SERVER(filecheck=CHECK): +//TEST:LANG_SERVER(filecheck=CHECK): void f() { float4 v; @@ -9,4 +9,4 @@ void f() // CHECK: x // CHECK: y // CHECK: z -// CHECK: w +// CHECK: w \ No newline at end of file diff --git a/tests/spirv/empty-module.slang b/tests/spirv/empty-module.slang index 0d5913d7739..76c98bdb96e 100644 --- a/tests/spirv/empty-module.slang +++ b/tests/spirv/empty-module.slang @@ -1,7 +1,7 @@ -//DISABLE_DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): -target spirv +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): -target spirv // missing entrypoint attribute void vertMain() {} -// CHECK: error 57004 +// CHECK: error 57004 \ No newline at end of file