[PATCH] D150776: [clang][dataflow] Use `Strict` accessors in comma operator and no-op cast.
Martin Böhme via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 23 04:58:18 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG68baaca61dfa: [clang][dataflow] Use `Strict` accessors in comma operator and no-op cast. (authored by mboehme).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150776/new/
https://reviews.llvm.org/D150776
Files:
clang/lib/Analysis/FlowSensitive/Transfer.cpp
Index: clang/lib/Analysis/FlowSensitive/Transfer.cpp
===================================================================
--- clang/lib/Analysis/FlowSensitive/Transfer.cpp
+++ clang/lib/Analysis/FlowSensitive/Transfer.cpp
@@ -224,8 +224,7 @@
break;
}
case BO_Comma: {
- if (auto *Loc = Env.getStorageLocation(*RHS, SkipPast::None))
- Env.setStorageLocation(*S, *Loc);
+ propagateValueOrStorageLocation(*RHS, *S, Env);
break;
}
default:
@@ -397,13 +396,9 @@
// CK_ConstructorConversion, and CK_UserDefinedConversion.
case CK_NoOp: {
// FIXME: Consider making `Environment::getStorageLocation` skip noop
- // expressions (this and other similar expressions in the file) instead of
- // assigning them storage locations.
- auto *SubExprLoc = Env.getStorageLocation(*SubExpr, SkipPast::None);
- if (SubExprLoc == nullptr)
- break;
-
- Env.setStorageLocation(*S, *SubExprLoc);
+ // expressions (this and other similar expressions in the file) instead
+ // of assigning them storage locations.
+ propagateValueOrStorageLocation(*SubExpr, *S, Env);
break;
}
case CK_NullToPointer:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150776.524659.patch
Type: text/x-patch
Size: 1207 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230523/36749a4e/attachment.bin>
More information about the cfe-commits
mailing list