diff options
author | Martin Braenne <mboehme@google.com> | 2023-07-17 06:27:59 +0000 |
---|---|---|
committer | Martin Braenne <mboehme@google.com> | 2023-07-17 07:26:10 +0000 |
commit | 6d768548ecc0ca37026986f397392c1d0ace9736 (patch) | |
tree | 58d657134c6d88484d96d43f4a912321f6854fd7 /clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp | |
parent | 4782597e3cd1b26cf8bd437e36fd6320f55d3d89 (diff) | |
download | llvm-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.cpp | 2 |
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; } |