@@ -45,10 +45,9 @@ namespace dataflow {
4545// / use(s.getFoo().value()); // unsafe (invalidate cache for s)
4646// / }
4747// / }
48- template <typename Base>
49- class CachedConstAccessorsLattice : public Base {
48+ template <typename Base> class CachedConstAccessorsLattice : public Base {
5049public:
51- using Base::Base; // inherit all constructors
50+ using Base::Base; // inherit all constructors
5251
5352 // / Creates or returns a previously created `Value` associated with a const
5453 // / method call `obj.getFoo()` where `RecordLoc` is the
@@ -74,8 +73,7 @@ class CachedConstAccessorsLattice : public Base {
7473 // / - `CE` should return a location (GLValue or a record type).
7574 StorageLocation *getOrCreateConstMethodReturnStorageLocation (
7675 const RecordStorageLocation &RecordLoc, const CallExpr *CE,
77- Environment &Env,
78- llvm::function_ref<void (StorageLocation &)> Initialize);
76+ Environment &Env, llvm::function_ref<void (StorageLocation &)> Initialize);
7977
8078 void clearConstMethodReturnValues (const RecordStorageLocation &RecordLoc) {
8179 ConstMethodReturnValues.erase (&RecordLoc);
@@ -95,9 +93,9 @@ class CachedConstAccessorsLattice : public Base {
9593private:
9694 // Maps a record storage location and const method to the value to return
9795 // from that const method.
98- using ConstMethodReturnValuesType = llvm::SmallDenseMap<
99- const RecordStorageLocation *,
100- llvm::SmallDenseMap<const FunctionDecl *, Value *>>;
96+ using ConstMethodReturnValuesType =
97+ llvm::SmallDenseMap< const RecordStorageLocation *,
98+ llvm::SmallDenseMap<const FunctionDecl *, Value *>>;
10199 ConstMethodReturnValuesType ConstMethodReturnValues;
102100
103101 // Maps a record storage location and const method to the record storage
@@ -194,8 +192,7 @@ template <typename Base>
194192StorageLocation *
195193CachedConstAccessorsLattice<Base>::getOrCreateConstMethodReturnStorageLocation(
196194 const RecordStorageLocation &RecordLoc, const CallExpr *CE,
197- Environment &Env,
198- llvm::function_ref<void (StorageLocation &)> Initialize) {
195+ Environment &Env, llvm::function_ref<void (StorageLocation &)> Initialize) {
199196 QualType Type = CE->getType ();
200197 assert (!Type.isNull ());
201198 assert (CE->isGLValue () || Type->isRecordType ());
@@ -218,4 +215,4 @@ CachedConstAccessorsLattice<Base>::getOrCreateConstMethodReturnStorageLocation(
218215} // namespace dataflow
219216} // namespace clang
220217
221- #endif // LLVM_CLANG_ANALYSIS_FLOWSENSITIVE_CACHED_CONST_ACCESSORS_LATTICE_H
218+ #endif // LLVM_CLANG_ANALYSIS_FLOWSENSITIVE_CACHED_CONST_ACCESSORS_LATTICE_H
0 commit comments