[llvm] c4c5e79 - Fix warnings
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 25 08:21:38 PST 2023
Author: Kazu Hirata
Date: 2023-01-25T08:21:29-08:00
New Revision: c4c5e79dd4b4c78eee7cffd9b0d7394b5bedcf12
URL: https://github.com/llvm/llvm-project/commit/c4c5e79dd4b4c78eee7cffd9b0d7394b5bedcf12
DIFF: https://github.com/llvm/llvm-project/commit/c4c5e79dd4b4c78eee7cffd9b0d7394b5bedcf12.diff
LOG: Fix warnings
This patch fixes:
clang-tools-extra/clangd/Hover.cpp:1036:28: warning: unused variable
‘MTE’ [-Wunused-variable]
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:22295:19: error:
unused variable 'AN' [-Werror,-Wunused-variable]
Added:
Modified:
clang-tools-extra/clangd/Hover.cpp
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/Hover.cpp b/clang-tools-extra/clangd/Hover.cpp
index 7f09e091afcb1..8649ddc9479ed 100644
--- a/clang-tools-extra/clangd/Hover.cpp
+++ b/clang-tools-extra/clangd/Hover.cpp
@@ -1033,8 +1033,7 @@ void maybeAddCalleeArgInfo(const SelectionTree::Node *N, HoverInfo &HI,
PassType.PassBy = HoverInfo::PassType::Value;
else
PassType.Converted = true;
- } else if (const auto *MTE =
- CastNode->ASTNode.get<MaterializeTemporaryExpr>()) {
+ } else if (CastNode->ASTNode.get<MaterializeTemporaryExpr>()) {
// Can't bind a non-const-ref to a temporary, so has to be const-ref
PassType.PassBy = HoverInfo::PassType::ConstRef;
} else { // Unknown implicit node, assume type conversion.
diff --git a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
index 46db20ecdd742..5afa4fbf9288d 100644
--- a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+++ b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -22292,8 +22292,7 @@ void AArch64TargetLowering::ReplaceNodeResults(
case ISD::ATOMIC_LOAD_AND:
case ISD::ATOMIC_LOAD_OR:
case ISD::ATOMIC_SWAP: {
- AtomicSDNode *AN = cast<AtomicSDNode>(N);
- assert(AN->getVal().getValueType() == MVT::i128 &&
+ assert(cast<AtomicSDNode>(N)->getVal().getValueType() == MVT::i128 &&
"Expected 128-bit atomicrmw.");
// These need custom type legalisation so we go directly to instruction.
ReplaceATOMIC_LOAD_128Results(N, Results, DAG, Subtarget);
More information about the llvm-commits
mailing list