aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp
diff options
context:
space:
mode:
authorYitzhak Mandelbaum <yitzhakm@google.com>2022-12-27 17:34:30 +0000
committerYitzhak Mandelbaum <yitzhakm@google.com>2023-01-10 14:17:25 +0000
commit264976d98e785fa061ce6ac06db4a9bda2590506 (patch)
tree9578ef790dcdac83a715d7bed4c25cd729006515 /clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp
parente2e5d5923604db30089c551ba2f469d245887585 (diff)
downloadllvm-264976d98e785fa061ce6ac06db4a9bda2590506.zip
llvm-264976d98e785fa061ce6ac06db4a9bda2590506.tar.gz
llvm-264976d98e785fa061ce6ac06db4a9bda2590506.tar.bz2
[clang][dataflow] Unify `TransferOptions` and `DataflowAnalysisContext::Options`.
Merges `TransferOptions` into the newly-introduced `DataflowAnalysisContext::Options` and removes explicit parameter for `TransferOptions`, relying instead on the common options carried by the analysis context. Given that there was no intent to allow different options between calls to `transfer`, a common value for the options is preferable. Differential Revision: https://reviews.llvm.org/D140703
Diffstat (limited to 'clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp')
-rw-r--r--clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp b/clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp
index 6b7b2dc..4632305 100644
--- a/clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp
+++ b/clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp
@@ -48,9 +48,8 @@ StorageLocation &DataflowAnalysisContext::createStorageLocation(QualType Type) {
// context-sensitive analysis. But, this only applies to storage locations,
// since fields access it not allowed to fail. In contrast, field *values*
// don't need this allowance, since the API allows for uninitialized fields.
- auto Fields = Options.EnableContextSensitiveAnalysis
- ? getObjectFields(Type)
- : getReferencedFields(Type);
+ auto Fields = Opts.ContextSensitiveOpts ? getObjectFields(Type)
+ : getReferencedFields(Type);
for (const FieldDecl *Field : Fields)
FieldLocs.insert({Field, &createStorageLocation(Field->getType())});
return takeOwnership(