From b40b711f54748145ed1340f2a3aa626dcb42b699 Mon Sep 17 00:00:00 2001 From: Sai Praveen Bangaru <31557731+saipraveenb25@users.noreply.github.com> Date: Fri, 21 Jul 2023 16:28:22 -0400 Subject: Fix data-flow analysis not propagating diff property through differentiable calls (#3010) * Add test for nodiff diagnostic for non-diff call propagated through diff call * Add logic to disambiguate calls to differentiable and non-differentiable methods * Add expected results for test * Simplify test * Update slang-ir-check-differentiability.cpp * Added comments for TreatAsDifferentiableExpr flavors --------- Co-authored-by: Yong He --- source/slang/slang-parser.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'source/slang/slang-parser.cpp') diff --git a/source/slang/slang-parser.cpp b/source/slang/slang-parser.cpp index b8310451c..b0af5378c 100644 --- a/source/slang/slang-parser.cpp +++ b/source/slang/slang-parser.cpp @@ -5298,6 +5298,7 @@ namespace Slang auto noDiffExpr = parser->astBuilder->create(); noDiffExpr->innerExpr = parser->ParseLeafExpression(); noDiffExpr->scope = parser->currentScope; + noDiffExpr->flavor = TreatAsDifferentiableExpr::Flavor::NoDiff; return noDiffExpr; } -- cgit v1.2.3