summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-parser.cpp
diff options
context:
space:
mode:
authorSai Praveen Bangaru <31557731+saipraveenb25@users.noreply.github.com>2023-07-21 16:28:22 -0400
committerGitHub <noreply@github.com>2023-07-21 13:28:22 -0700
commitb40b711f54748145ed1340f2a3aa626dcb42b699 (patch)
tree5c63286c13d55c79b4f21f899e8e338393049f8f /source/slang/slang-parser.cpp
parent32043a48b6503fe3e493082c33eac02865503031 (diff)
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 <yonghe@outlook.com>
Diffstat (limited to 'source/slang/slang-parser.cpp')
-rw-r--r--source/slang/slang-parser.cpp1
1 files changed, 1 insertions, 0 deletions
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<TreatAsDifferentiableExpr>();
noDiffExpr->innerExpr = parser->ParseLeafExpression();
noDiffExpr->scope = parser->currentScope;
+ noDiffExpr->flavor = TreatAsDifferentiableExpr::Flavor::NoDiff;
return noDiffExpr;
}