[clang] 5e28923 - [clang][dataflow][NFC] Remove last use of deprecated ctor

Eric Li via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 27 11:23:44 PDT 2022


Author: Eric Li
Date: 2022-07-27T14:23:35-04:00
New Revision: 5e28923e332f2e738d17d35f1978df3391ee10af

URL: https://github.com/llvm/llvm-project/commit/5e28923e332f2e738d17d35f1978df3391ee10af
DIFF: https://github.com/llvm/llvm-project/commit/5e28923e332f2e738d17d35f1978df3391ee10af.diff

LOG: [clang][dataflow][NFC] Remove last use of deprecated ctor

Use a delegating constructor to remove the last use of the deprecated
ctor of `TypeErasedDataflowAnalysis`, and then delete it.

Differential Revision: https://reviews.llvm.org/D130653

Added: 
    

Modified: 
    clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h
    clang/include/clang/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.h

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h b/clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h
index ef8f7a51496c9..a8785c554eb2f 100644
--- a/clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h
+++ b/clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h
@@ -66,7 +66,8 @@ class DataflowAnalysis : public TypeErasedDataflowAnalysis {
 
   /// Deprecated. Use the `DataflowAnalysisOptions` constructor instead.
   explicit DataflowAnalysis(ASTContext &Context, bool ApplyBuiltinTransfer)
-      : TypeErasedDataflowAnalysis(ApplyBuiltinTransfer), Context(Context) {}
+      : DataflowAnalysis(Context, DataflowAnalysisOptions{ApplyBuiltinTransfer,
+                                                          TransferOptions{}}) {}
 
   explicit DataflowAnalysis(ASTContext &Context,
                             DataflowAnalysisOptions Options)

diff  --git a/clang/include/clang/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.h b/clang/include/clang/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.h
index 92700f164e7bd..3a108402ab159 100644
--- a/clang/include/clang/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.h
+++ b/clang/include/clang/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.h
@@ -59,10 +59,6 @@ class TypeErasedDataflowAnalysis : public Environment::ValueModel {
 public:
   TypeErasedDataflowAnalysis() : Options({}) {}
 
-  /// Deprecated. Use the `DataflowAnalysisOptions` constructor instead.
-  TypeErasedDataflowAnalysis(bool ApplyBuiltinTransfer)
-      : Options({ApplyBuiltinTransfer, TransferOptions{}}) {}
-
   TypeErasedDataflowAnalysis(DataflowAnalysisOptions Options)
       : Options(Options) {}
 


        


More information about the cfe-commits mailing list