This patch restructures DataflowAnalysisOptions and TransferOptions to use llvm::Optional, in preparation for adding more sub-options to the ContextSensitiveOptions struct introduced here.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
LLVM switched to C++17 recently. I am not sure whether this means std::optional is preferred over llvm::Optional.
clang/unittests/Analysis/FlowSensitive/TransferTest.cpp | ||
---|---|---|
3902 | I think llvm::None is a more concise way to create an empty optional (akin to std::nullopt). |
clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h | ||
---|---|---|
70 | ||
clang/include/clang/Analysis/FlowSensitive/Transfer.h | ||
31 | Perhaps keep the name ContextSensitive? In the context of TransferOptions it seems clear what this is. | |
clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp | ||
322 | For consistency. | |
clang/unittests/Analysis/FlowSensitive/TransferTest.cpp | ||
69 | ||
3902 |
clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h | ||
---|---|---|
70 | I tried that, but I get the following error message:
| |
clang/include/clang/Analysis/FlowSensitive/Transfer.h | ||
31 | I don't have a strong preference either way; does anyone else have an opinion on this? | |
clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp | ||
322 | Ah thanks! Will do. | |
clang/unittests/Analysis/FlowSensitive/TransferTest.cpp | ||
69 | Same error mentioned above. |