[clang] afc6da4 - [clang][dataflow] Silence unused variable warning. NFCI
Benjamin Kramer via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 16 16:36:54 PDT 2024
Author: Benjamin Kramer
Date: 2024-10-17T01:36:15+02:00
New Revision: afc6da43d5ae068d041728d96b6b6590f94afbb0
URL: https://github.com/llvm/llvm-project/commit/afc6da43d5ae068d041728d96b6b6590f94afbb0
DIFF: https://github.com/llvm/llvm-project/commit/afc6da43d5ae068d041728d96b6b6590f94afbb0.diff
LOG: [clang][dataflow] Silence unused variable warning. NFCI
Added:
Modified:
clang/include/clang/Analysis/FlowSensitive/CachedConstAccessorsLattice.h
Removed:
################################################################################
diff --git a/clang/include/clang/Analysis/FlowSensitive/CachedConstAccessorsLattice.h b/clang/include/clang/Analysis/FlowSensitive/CachedConstAccessorsLattice.h
index 3c3028eb9452fe..3402d105746e88 100644
--- a/clang/include/clang/Analysis/FlowSensitive/CachedConstAccessorsLattice.h
+++ b/clang/include/clang/Analysis/FlowSensitive/CachedConstAccessorsLattice.h
@@ -193,9 +193,8 @@ StorageLocation *
CachedConstAccessorsLattice<Base>::getOrCreateConstMethodReturnStorageLocation(
const RecordStorageLocation &RecordLoc, const CallExpr *CE,
Environment &Env, llvm::function_ref<void(StorageLocation &)> Initialize) {
- QualType Type = CE->getType();
- assert(!Type.isNull());
- assert(CE->isGLValue() || Type->isRecordType());
+ assert(!CE->getType().isNull());
+ assert(CE->isGLValue() || CE->getType()->isRecordType());
auto &ObjMap = ConstMethodReturnStorageLocations[&RecordLoc];
const FunctionDecl *DirectCallee = CE->getDirectCallee();
if (DirectCallee == nullptr)
More information about the cfe-commits
mailing list