Skip to content

Commit 4885d65

Browse files
committed
clang-format
1 parent f82e63e commit 4885d65

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

clang/include/clang/Analysis/FlowSensitive/CachedConstAccessorsLattice.h

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -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 {
5049
public:
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 {
9593
private:
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>
194192
StorageLocation *
195193
CachedConstAccessorsLattice<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

clang/unittests/Analysis/FlowSensitive/CachedConstAccessorsLatticeTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ struct CommonTestInputs {
9191
.bind("call"),
9292
AST.context()));
9393
assert(CallRef != nullptr);
94-
}
94+
}
9595

9696
TestAST AST;
9797
QualType SType;

0 commit comments

Comments
 (0)