diff options
author | Matheus Izvekov <mizvekov@gmail.com> | 2025-09-24 17:18:41 -0300 |
---|---|---|
committer | Matheus Izvekov <mizvekov@gmail.com> | 2025-09-26 16:18:42 -0300 |
commit | 1160542a693e22cc81c719e371d1b6282ecc3800 (patch) | |
tree | 1c23ff6c8b9bc54926911560b84450d937e51047 /clang/lib/AST/StmtProfile.cpp | |
parent | 21fe7eea5c0f7dbfe8b08251a594c23ea2e8980d (diff) | |
download | llvm-users/mizvekov/fix-substnttp-transform.zip llvm-users/mizvekov/fix-substnttp-transform.tar.gz llvm-users/mizvekov/fix-substnttp-transform.tar.bz2 |
[clang] fix transformation of subst constant template parameter nodesusers/mizvekov/fix-substnttp-transform
This simplifies those transforms a lot, removing a bunch of workarounds
which were introducing problems.
The transforms become independent of the template instantiator, so
they are moved to TreeTransform instead.
Fixes #131342
Diffstat (limited to 'clang/lib/AST/StmtProfile.cpp')
-rw-r--r-- | clang/lib/AST/StmtProfile.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/AST/StmtProfile.cpp b/clang/lib/AST/StmtProfile.cpp index 37c4d43..8b3af94 100644 --- a/clang/lib/AST/StmtProfile.cpp +++ b/clang/lib/AST/StmtProfile.cpp @@ -1353,7 +1353,8 @@ void StmtProfiler::VisitExpr(const Expr *S) { } void StmtProfiler::VisitConstantExpr(const ConstantExpr *S) { - VisitExpr(S); + // Profile exactly as the sub-expression. + Visit(S->getSubExpr()); } void StmtProfiler::VisitDeclRefExpr(const DeclRefExpr *S) { |