[clang] [clang][dataflow] Eliminate two uses of `RecordValue::getLoc()`. (PR #79163)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 23 08:22:06 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: None (martinboehme)
<details>
<summary>Changes</summary>
This is a small step towards eventually eliminating `RecordValue` entirely.
---
Full diff: https://github.com/llvm/llvm-project/pull/79163.diff
1 Files Affected:
- (modified) clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp (+2-2)
``````````diff
diff --git a/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp b/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
index 07dc3a9f76ac23b..3567ca41d07c77e 100644
--- a/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
+++ b/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
@@ -412,13 +412,13 @@ void Environment::initialize() {
QualType ThisPointeeType =
SurroundingMethodDecl->getFunctionObjectParameterType();
setThisPointeeStorageLocation(
- cast<RecordValue>(createValue(ThisPointeeType))->getLoc());
+ cast<RecordStorageLocation>(createObject(ThisPointeeType)));
}
}
} else if (MethodDecl->isImplicitObjectMemberFunction()) {
QualType ThisPointeeType = MethodDecl->getFunctionObjectParameterType();
setThisPointeeStorageLocation(
- cast<RecordValue>(createValue(ThisPointeeType))->getLoc());
+ cast<RecordStorageLocation>(createObject(ThisPointeeType)));
}
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/79163
More information about the cfe-commits
mailing list