diff --git a/clang/lib/Analysis/BodyFarm.cpp b/clang/lib/Analysis/BodyFarm.cpp index c5f35b35ad357..cc82b7884fc10 100644 --- a/clang/lib/Analysis/BodyFarm.cpp +++ b/clang/lib/Analysis/BodyFarm.cpp @@ -256,7 +256,7 @@ ValueDecl *ASTMaker::findMemberField(const RecordDecl *RD, StringRef Name) { // Creation functions for faux ASTs. //===----------------------------------------------------------------------===// -typedef Stmt *(*FunctionFarmer)(ASTContext &C, const FunctionDecl *D); +using FunctionFarmer = Stmt *(*)(ASTContext & C, const FunctionDecl *D); static CallExpr *create_call_once_funcptr_call(ASTContext &C, ASTMaker M, const ParmVarDecl *Callback, diff --git a/clang/lib/Analysis/CFGStmtMap.cpp b/clang/lib/Analysis/CFGStmtMap.cpp index 028e62ba89b79..79052d93996dc 100644 --- a/clang/lib/Analysis/CFGStmtMap.cpp +++ b/clang/lib/Analysis/CFGStmtMap.cpp @@ -19,7 +19,7 @@ using namespace clang; -typedef llvm::DenseMap SMap; +using SMap = llvm::DenseMap; static SMap *AsMap(void *m) { return (SMap*) m; } CFGStmtMap::~CFGStmtMap() { delete AsMap(M); } diff --git a/clang/lib/Analysis/ReachableCode.cpp b/clang/lib/Analysis/ReachableCode.cpp index 4a9ab5d9f0f73..c6f2ecf058f48 100644 --- a/clang/lib/Analysis/ReachableCode.cpp +++ b/clang/lib/Analysis/ReachableCode.cpp @@ -397,8 +397,8 @@ namespace { Preprocessor &PP; ASTContext &C; - typedef SmallVector, 12> - DeferredLocsTy; + using DeferredLocsTy = + SmallVector, 12>; DeferredLocsTy DeferredLocs; diff --git a/clang/lib/StaticAnalyzer/Checkers/CheckObjCInstMethSignature.cpp b/clang/lib/StaticAnalyzer/Checkers/CheckObjCInstMethSignature.cpp index c8fe5c2ccf384..9eaeaa37d8c94 100644 --- a/clang/lib/StaticAnalyzer/Checkers/CheckObjCInstMethSignature.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/CheckObjCInstMethSignature.cpp @@ -86,7 +86,7 @@ static void CheckObjCInstMethSignature(const ObjCImplementationDecl *ID, ASTContext &Ctx = BR.getContext(); // Build a DenseMap of the methods for quick querying. - typedef llvm::DenseMap MapTy; + using MapTy = llvm::DenseMap; MapTy IMeths; unsigned NumMethods = 0; diff --git a/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp b/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp index 17af1aebd6d2a..5afe7d93b86f3 100644 --- a/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp @@ -94,8 +94,8 @@ class WalkAST : public StmtVisitor { // Helpers. bool checkCall_strCommon(const CallExpr *CE, const FunctionDecl *FD); - typedef void (WalkAST::*FnCheck)(const CallExpr *, const FunctionDecl *); - typedef void (WalkAST::*MsgCheck)(const ObjCMessageExpr *); + using FnCheck = void (WalkAST::*)(const CallExpr *, const FunctionDecl *); + using MsgCheck = void (WalkAST::*)(const ObjCMessageExpr *); // Checker-specific methods. void checkLoopConditionForFloat(const ForStmt *FS); diff --git a/clang/lib/StaticAnalyzer/Checkers/DebugCheckers.cpp b/clang/lib/StaticAnalyzer/Checkers/DebugCheckers.cpp index 04bbe85473c0e..61b7edf26b5d0 100644 --- a/clang/lib/StaticAnalyzer/Checkers/DebugCheckers.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/DebugCheckers.cpp @@ -257,7 +257,7 @@ bool ento::shouldRegisterCallGraphDumper(const CheckerManager &mgr) { namespace { class ConfigDumper : public Checker< check::EndOfTranslationUnit > { - typedef AnalyzerOptions::ConfigTable Table; + using Table = AnalyzerOptions::ConfigTable; static int compareEntry(const Table::MapEntryTy *const *LHS, const Table::MapEntryTy *const *RHS) { diff --git a/clang/lib/StaticAnalyzer/Checkers/DebugContainerModeling.cpp b/clang/lib/StaticAnalyzer/Checkers/DebugContainerModeling.cpp index d3830a01dd0cb..3227166e22773 100644 --- a/clang/lib/StaticAnalyzer/Checkers/DebugContainerModeling.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/DebugContainerModeling.cpp @@ -38,8 +38,8 @@ class DebugContainerModeling void analyzerContainerEnd(const CallExpr *CE, CheckerContext &C) const; ExplodedNode *reportDebugMsg(llvm::StringRef Msg, CheckerContext &C) const; - typedef void (DebugContainerModeling::*FnCheck)(const CallExpr *, - CheckerContext &) const; + using FnCheck = void (DebugContainerModeling::*)(const CallExpr *, + CheckerContext &) const; CallDescriptionMap Callbacks = { {{CDM::SimpleFunc, {"clang_analyzer_container_begin"}, 1}, diff --git a/clang/lib/StaticAnalyzer/Checkers/DebugIteratorModeling.cpp b/clang/lib/StaticAnalyzer/Checkers/DebugIteratorModeling.cpp index 203743dacda63..1df77647a4bdc 100644 --- a/clang/lib/StaticAnalyzer/Checkers/DebugIteratorModeling.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/DebugIteratorModeling.cpp @@ -39,8 +39,8 @@ class DebugIteratorModeling void analyzerIteratorValidity(const CallExpr *CE, CheckerContext &C) const; ExplodedNode *reportDebugMsg(llvm::StringRef Msg, CheckerContext &C) const; - typedef void (DebugIteratorModeling::*FnCheck)(const CallExpr *, - CheckerContext &) const; + using FnCheck = void (DebugIteratorModeling::*)(const CallExpr *, + CheckerContext &) const; CallDescriptionMap Callbacks = { {{CDM::SimpleFunc, {"clang_analyzer_iterator_position"}, 1}, diff --git a/clang/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp b/clang/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp index fc174e29be470..9c3d447c3498e 100644 --- a/clang/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp @@ -51,8 +51,8 @@ static bool DefaultMethodFilter(const ObjCMethodDecl *M) { class DirectIvarAssignment : public Checker > { - typedef llvm::DenseMap IvarToPropertyMapTy; + using IvarToPropertyMapTy = + llvm::DenseMap; /// A helper class, which walks the AST and locates all assignments to ivars /// in the given function. diff --git a/clang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp index 6035e2d34c2b3..2b79aa2b298af 100644 --- a/clang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp @@ -54,8 +54,8 @@ class ExprInspectionChecker void analyzerExpress(const CallExpr *CE, CheckerContext &C) const; void analyzerIsTainted(const CallExpr *CE, CheckerContext &C) const; - typedef void (ExprInspectionChecker::*FnCheck)(const CallExpr *, - CheckerContext &C) const; + using FnCheck = void (ExprInspectionChecker::*)(const CallExpr *, + CheckerContext &C) const; // Optional parameter `ExprVal` for expression value to be marked interesting. ExplodedNode *reportBug(llvm::StringRef Msg, CheckerContext &C, diff --git a/clang/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp index 2f971fb05cc3b..c0755c0b0b29c 100644 --- a/clang/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp @@ -53,13 +53,13 @@ struct ChecksFilter { }; class IvarInvalidationCheckerImpl { - typedef llvm::SmallSetVector MethodSet; - typedef llvm::DenseMap MethToIvarMapTy; - typedef llvm::DenseMap PropToIvarMapTy; - typedef llvm::DenseMap IvarToPropMapTy; + using MethodSet = llvm::SmallSetVector; + using MethToIvarMapTy = + llvm::DenseMap; + using PropToIvarMapTy = + llvm::DenseMap; + using IvarToPropMapTy = + llvm::DenseMap; struct InvalidationInfo { /// Has the ivar been invalidated? @@ -90,7 +90,7 @@ class IvarInvalidationCheckerImpl { } }; - typedef llvm::DenseMap IvarSet; + using IvarSet = llvm::DenseMap; /// Statement visitor, which walks the method body and flags the ivars /// referenced in it (either directly or via property). diff --git a/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPITypes.h b/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPITypes.h index fe0fb2a4d0e72..bee3663c318fc 100644 --- a/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPITypes.h +++ b/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPITypes.h @@ -46,9 +46,8 @@ class Request { // operations. A custom map implementation is used, in order to make it // available in an arbitrary amount of translation units. struct RequestMap {}; -typedef llvm::ImmutableMap - RequestMapImpl; +using RequestMapImpl = llvm::ImmutableMap; } // end of namespace: mpi diff --git a/clang/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp index 4f829a1dda09f..2da80bc1d7b7e 100644 --- a/clang/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp @@ -71,8 +71,8 @@ class MacOSKeychainAPIChecker : public Checker, const char *NL, const char *Sep) const override; private: - typedef std::pair AllocationPair; - typedef SmallVector AllocationPairVec; + using AllocationPair = std::pair; + using AllocationPairVec = SmallVector; enum APIKind { /// Denotes functions tracked by this checker. diff --git a/clang/lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp index 40985f426bdc2..76c829af38e06 100644 --- a/clang/lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp @@ -40,9 +40,9 @@ class MacOSXAPIChecker : public Checker< check::PreStmt > { void CheckDispatchOnce(CheckerContext &C, const CallExpr *CE, StringRef FName) const; - typedef void (MacOSXAPIChecker::*SubChecker)(CheckerContext &, - const CallExpr *, - StringRef FName) const; + using SubChecker = void (MacOSXAPIChecker::*)(CheckerContext &, + const CallExpr *, + StringRef FName) const; }; } //end anonymous namespace diff --git a/clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp index f84d45214f6fe..23455b1135275 100644 --- a/clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp @@ -26,8 +26,8 @@ using namespace ento; namespace { -typedef std::pair TypeCallPair; -typedef llvm::PointerUnion ExprParent; +using TypeCallPair = std::pair; +using ExprParent = llvm::PointerUnion; class CastedAllocFinder : public ConstStmtVisitor { @@ -47,7 +47,7 @@ class CastedAllocFinder ExplicitCastType(ExplicitCastType), AllocCall(AllocCall) {} }; - typedef std::vector CallVec; + using CallVec = std::vector; CallVec Calls; CastedAllocFinder(ASTContext *Ctx) : diff --git a/clang/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp index 15fd9a0b76cc3..cd240d821b48e 100644 --- a/clang/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp @@ -177,7 +177,7 @@ class NSOrCFErrorDerefChecker }; } -typedef llvm::ImmutableMap ErrorOutFlag; +using ErrorOutFlag = llvm::ImmutableMap; REGISTER_TRAIT_WITH_PROGRAMSTATE(NSErrorOut, ErrorOutFlag) REGISTER_TRAIT_WITH_PROGRAMSTATE(CFErrorOut, ErrorOutFlag) diff --git a/clang/lib/StaticAnalyzer/Checkers/ObjCUnusedIVarsChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/ObjCUnusedIVarsChecker.cpp index a2af7b17c67fd..3873a82ad4e3c 100644 --- a/clang/lib/StaticAnalyzer/Checkers/ObjCUnusedIVarsChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/ObjCUnusedIVarsChecker.cpp @@ -27,7 +27,7 @@ using namespace clang; using namespace ento; enum IVarState { Unused, Used }; -typedef llvm::DenseMap IvarUsageMap; +using IvarUsageMap = llvm::DenseMap; static void Scan(IvarUsageMap& M, const Stmt *S) { if (!S) diff --git a/clang/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp index 86530086ff1b2..5b1770c4d89de 100644 --- a/clang/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp @@ -82,9 +82,9 @@ class PthreadLockChecker : public Checker PThreadCallbacks = { // Init. {{CDM::CLibrary, {"pthread_mutex_init"}, 2}, diff --git a/clang/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp index 5152624d00f46..cdcec88792862 100644 --- a/clang/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp @@ -26,7 +26,7 @@ using namespace clang; using namespace ento; namespace { -typedef SmallVector SymbolVector; +using SymbolVector = SmallVector; struct StreamState { private: diff --git a/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp index 52b3d1e95942c..a9f0028675ea3 100644 --- a/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp @@ -91,16 +91,16 @@ class StdLibraryFunctionsChecker /// The universal integral type to use in value range descriptions. /// Unsigned to make sure overflows are well-defined. - typedef uint64_t RangeInt; + using RangeInt = uint64_t; /// Describes a single range constraint. Eg. {{0, 1}, {3, 4}} is /// a non-negative integer, which less than 5 and not equal to 2. - typedef std::vector> IntRangeVector; + using IntRangeVector = std::vector>; /// A reference to an argument or return value by its number. /// ArgNo in CallExpr and CallEvent is defined as Unsigned, but /// obviously uint32_t should be enough for all practical purposes. - typedef uint32_t ArgNo; + using ArgNo = uint32_t; /// Special argument number for specifying the return value. static const ArgNo Ret; diff --git a/clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp index ff7615212d34d..4b3a0e1c139f0 100644 --- a/clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp @@ -35,7 +35,7 @@ class UnreachableCodeChecker : public Checker { void checkEndAnalysis(ExplodedGraph &G, BugReporter &B, ExprEngine &Eng) const; private: - typedef llvm::SmallSet CFGBlocksSet; + using CFGBlocksSet = llvm::SmallSet; static inline const Stmt *getUnreachableStmt(const CFGBlock *CB); static void FindUnreachableEntryPoints(const CFGBlock *CB, diff --git a/clang/lib/StaticAnalyzer/Checkers/ValistChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/ValistChecker.cpp index bd2f88c7b1bcc..c04b674da5645 100644 --- a/clang/lib/StaticAnalyzer/Checkers/ValistChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/ValistChecker.cpp @@ -25,7 +25,7 @@ using namespace ento; REGISTER_SET_WITH_PROGRAMSTATE(InitializedVALists, const MemRegion *) namespace { -typedef SmallVector RegionVector; +using RegionVector = SmallVector; class ValistChecker : public Checker, check::DeadSymbols> { diff --git a/clang/lib/StaticAnalyzer/Core/BlockCounter.cpp b/clang/lib/StaticAnalyzer/Core/BlockCounter.cpp index e7ac6f1cfa001..f5574f14b375e 100644 --- a/clang/lib/StaticAnalyzer/Core/BlockCounter.cpp +++ b/clang/lib/StaticAnalyzer/Core/BlockCounter.cpp @@ -44,7 +44,7 @@ class CountKey { } -typedef llvm::ImmutableMap CountMap; +using CountMap = llvm::ImmutableMap; static inline CountMap GetMap(void *D) { return CountMap(static_cast(D)); diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp index d87484470f8b5..51391352230ef 100644 --- a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp +++ b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp @@ -183,8 +183,8 @@ class ConstructedObjectKey { }; } // namespace -typedef llvm::ImmutableMap - ObjectsUnderConstructionMap; +using ObjectsUnderConstructionMap = + llvm::ImmutableMap; REGISTER_TRAIT_WITH_PROGRAMSTATE(ObjectsUnderConstruction, ObjectsUnderConstructionMap) @@ -194,22 +194,20 @@ REGISTER_TRAIT_WITH_PROGRAMSTATE(ObjectsUnderConstruction, // memory region, which is important for multi-dimensional arrays. E.g:: int // arr[2][2]; assume arr[1][1] will be the next element under construction, so // the index is 3. -typedef llvm::ImmutableMap< - std::pair, unsigned> - IndexOfElementToConstructMap; +using IndexOfElementToConstructMap = llvm::ImmutableMap< + std::pair, unsigned>; REGISTER_TRAIT_WITH_PROGRAMSTATE(IndexOfElementToConstruct, IndexOfElementToConstructMap) // This trait is responsible for holding our pending ArrayInitLoopExprs. // It pairs the LocationContext and the initializer CXXConstructExpr with // the size of the array that's being copy initialized. -typedef llvm::ImmutableMap< - std::pair, unsigned> - PendingInitLoopMap; +using PendingInitLoopMap = llvm::ImmutableMap< + std::pair, unsigned>; REGISTER_TRAIT_WITH_PROGRAMSTATE(PendingInitLoop, PendingInitLoopMap) -typedef llvm::ImmutableMap - PendingArrayDestructionMap; +using PendingArrayDestructionMap = + llvm::ImmutableMap; REGISTER_TRAIT_WITH_PROGRAMSTATE(PendingArrayDestruction, PendingArrayDestructionMap) diff --git a/clang/lib/StaticAnalyzer/Core/ProgramState.cpp b/clang/lib/StaticAnalyzer/Core/ProgramState.cpp index c4790b0284281..72d8113441424 100644 --- a/clang/lib/StaticAnalyzer/Core/ProgramState.cpp +++ b/clang/lib/StaticAnalyzer/Core/ProgramState.cpp @@ -144,8 +144,8 @@ ProgramState::bindDefaultZero(SVal loc, const LocationContext *LCtx) const { return Mgr.getOwningEngine().processRegionChange(State, R, LCtx); } -typedef ArrayRef RegionList; -typedef ArrayRef ValueList; +using RegionList = ArrayRef; +using ValueList = ArrayRef; ProgramStateRef ProgramState::invalidateRegions( RegionList Regions, ConstCFGElementRef Elem, unsigned Count, diff --git a/clang/lib/StaticAnalyzer/Core/RegionStore.cpp b/clang/lib/StaticAnalyzer/Core/RegionStore.cpp index 388034b087789..a89a8f7b6de10 100644 --- a/clang/lib/StaticAnalyzer/Core/RegionStore.cpp +++ b/clang/lib/StaticAnalyzer/Core/RegionStore.cpp @@ -152,12 +152,11 @@ void BindingKey::dump() const { llvm::errs() << *this; } // Actual Store type. //===----------------------------------------------------------------------===// -typedef llvm::ImmutableMap ClusterBindings; -typedef llvm::ImmutableMapRef ClusterBindingsRef; -typedef std::pair BindingPair; +using ClusterBindings = llvm::ImmutableMap; +using ClusterBindingsRef = llvm::ImmutableMapRef; +using BindingPair = std::pair; -typedef llvm::ImmutableMap - RegionBindings; +using RegionBindings = llvm::ImmutableMap; namespace { class RegionBindingsRef : public llvm::ImmutableMapRef - ParentTy; + using ParentTy = llvm::ImmutableMapRef; RegionBindingsRef(ClusterBindings::Factory &CBFactory, const RegionBindings::TreeTy *T, @@ -396,8 +394,8 @@ class LimitedRegionBindingsRef : public RegionBindingsRef { std::optional BindingsLeft; }; -typedef const RegionBindingsRef& RegionBindingsConstRef; -typedef const LimitedRegionBindingsRef &LimitedRegionBindingsConstRef; +using RegionBindingsConstRef = const RegionBindingsRef &; +using LimitedRegionBindingsConstRef = const LimitedRegionBindingsRef &; std::optional RegionBindingsRef::getDirectBinding(const MemRegion *R) const { @@ -474,10 +472,11 @@ class RegionStoreManager : public StoreManager { RegionBindings::Factory RBFactory; mutable ClusterBindings::Factory CBFactory; - typedef std::vector SValListTy; + using SValListTy = std::vector; + private: - typedef llvm::DenseMap LazyBindingsMapTy; + using LazyBindingsMapTy = + llvm::DenseMap; LazyBindingsMapTy LazyBindingsMap; /// The largest number of fields a struct can have and still be @@ -860,9 +859,9 @@ enum GlobalsFilterKind { template class ClusterAnalysis { protected: - typedef llvm::DenseMap ClusterMap; - typedef const MemRegion * WorkListElement; - typedef SmallVector WorkList; + using ClusterMap = llvm::DenseMap; + using WorkListElement = const MemRegion *; + using WorkList = SmallVector; llvm::SmallPtrSet Visited; @@ -972,7 +971,7 @@ static inline bool isUnionField(const FieldRegion *FR) { return FR->getDecl()->getParent()->isUnion(); } -typedef SmallVector FieldVector; +using FieldVector = SmallVector; static void getSymbolicOffsetFields(BindingKey K, FieldVector &Fields) { assert(K.hasSymbolicOffset() && "Not implemented for concrete offset keys"); @@ -1729,7 +1728,7 @@ RegionStoreManager::findLazyBinding(RegionBindingsConstRef B, return std::make_pair(V->getStore(), V->getRegion()); } - typedef std::pair StoreRegionPair; + using StoreRegionPair = std::pair; StoreRegionPair Result = StoreRegionPair(); if (const ElementRegion *ER = dyn_cast(R)) { diff --git a/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp b/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp index 53466e7a75b0f..f9adfff13a0b4 100644 --- a/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp +++ b/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp @@ -72,7 +72,7 @@ class AnalysisConsumer : public AnalysisASTConsumer, AM_Syntax = 0x1, AM_Path = 0x2 }; - typedef unsigned AnalysisMode; + using AnalysisMode = unsigned; /// Mode of the analyzes while recursively visiting Decls. AnalysisMode RecVisitorMode;