Author: Timm Bäder Date: 2024-07-12T17:18:26+02:00 New Revision: 1752b7bc521ae878355a1c9e48644b0ad320dbe5
URL: https://github.com/llvm/llvm-project/commit/1752b7bc521ae878355a1c9e48644b0ad320dbe5 DIFF: https://github.com/llvm/llvm-project/commit/1752b7bc521ae878355a1c9e48644b0ad320dbe5.diff LOG: [clang][Interp][NFC] Apply some clang-tidy suggestions Remove unused includes and don't use an else after a return. Added: Modified: clang/lib/AST/Interp/InterpFrame.h Removed: ################################################################################ diff --git a/clang/lib/AST/Interp/InterpFrame.h b/clang/lib/AST/Interp/InterpFrame.h index 1f80a0a5d2c49..4a312a71bcf1c 100644 --- a/clang/lib/AST/Interp/InterpFrame.h +++ b/clang/lib/AST/Interp/InterpFrame.h @@ -15,8 +15,6 @@ #include "Frame.h" #include "Program.h" -#include <cstdint> -#include <vector> namespace clang { namespace interp { @@ -85,11 +83,9 @@ class InterpFrame final : public Frame { /// Returns the value of an argument. template <typename T> const T &getParam(unsigned Offset) const { auto Pt = Params.find(Offset); - if (Pt == Params.end()) { + if (Pt == Params.end()) return stackRef<T>(Offset); - } else { - return Pointer(reinterpret_cast<Block *>(Pt->second.get())).deref<T>(); - } + return Pointer(reinterpret_cast<Block *>(Pt->second.get())).deref<T>(); } /// Mutates a local copy of a parameter. _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits