aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp
diff options
context:
space:
mode:
authorMartin Braenne <mboehme@google.com>2023-07-17 06:27:59 +0000
committerMartin Braenne <mboehme@google.com>2023-07-17 07:26:10 +0000
commit6d768548ecc0ca37026986f397392c1d0ace9736 (patch)
tree58d657134c6d88484d96d43f4a912321f6854fd7 /clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp
parent4782597e3cd1b26cf8bd437e36fd6320f55d3d89 (diff)
downloadllvm-6d768548ecc0ca37026986f397392c1d0ace9736.zip
llvm-6d768548ecc0ca37026986f397392c1d0ace9736.tar.gz
llvm-6d768548ecc0ca37026986f397392c1d0ace9736.tar.bz2
[clang][dataflow] Add `DataflowEnvironment::createObject()`.
This consolidates the code used in various places to initialize objects (usually for variables) into one central location. It will also help reduce the number of changes needed when we make the upcoming API changes to `AggregateStorageLocation` and `StructValue`. Depends On D155074 Reviewed By: ymandel, xazax.hun Differential Revision: https://reviews.llvm.org/D155075
Diffstat (limited to 'clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp')
-rw-r--r--clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp b/clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp
index 531115e..bb1c2c7 100644
--- a/clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp
+++ b/clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp
@@ -72,7 +72,7 @@ StorageLocation &
DataflowAnalysisContext::getStableStorageLocation(const VarDecl &D) {
if (auto *Loc = getStorageLocation(D))
return *Loc;
- auto &Loc = createStorageLocation(D.getType());
+ auto &Loc = createStorageLocation(D.getType().getNonReferenceType());
setStorageLocation(D, Loc);
return Loc;
}