diff options
author | Eugene Zelenko <eugene.zelenko@gmail.com> | 2015-11-04 22:32:32 +0000 |
---|---|---|
committer | Eugene Zelenko <eugene.zelenko@gmail.com> | 2015-11-04 22:32:32 +0000 |
commit | 4e036ff575c54e01aea7f8028d282974480b071e (patch) | |
tree | 88b10c6605effbdb8176308168401f15f6789fa6 /tools | |
parent | 32968f1f6e71a3a98645bcc13d0cd901fa717617 (diff) |
Fix some Clang-tidy modernize warnings, other minor fixes.
Fixed warnings are: modernize-use-override, modernize-use-nullptr and modernize-redundant-void-arg.
Differential revision: http://reviews.llvm.org/D14312
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252087 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/lli/RemoteTarget.cpp | 4 | ||||
-rw-r--r-- | tools/llvm-mc/llvm-mc.cpp | 5 | ||||
-rw-r--r-- | tools/llvm-size/llvm-size.cpp | 5 |
3 files changed, 8 insertions, 6 deletions
diff --git a/tools/lli/RemoteTarget.cpp b/tools/lli/RemoteTarget.cpp index 850fdc50699..95e1511eaaf 100644 --- a/tools/lli/RemoteTarget.cpp +++ b/tools/lli/RemoteTarget.cpp @@ -1,4 +1,4 @@ -//===- RemoteTarget.cpp - LLVM Remote process JIT execution --------------===// +//===- RemoteTarget.cpp - LLVM Remote process JIT execution -----*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -56,7 +56,7 @@ bool RemoteTarget::loadCode(uint64_t Address, const void *Data, size_t Size) { } bool RemoteTarget::executeCode(uint64_t Address, int &RetVal) { - int (*fn)(void) = (int(*)(void))Address; + int (*fn)() = (int(*)())Address; RetVal = fn(); return true; } diff --git a/tools/llvm-mc/llvm-mc.cpp b/tools/llvm-mc/llvm-mc.cpp index 6e6b748c3d2..f3b34e2502f 100644 --- a/tools/llvm-mc/llvm-mc.cpp +++ b/tools/llvm-mc/llvm-mc.cpp @@ -1,4 +1,4 @@ -//===-- llvm-mc.cpp - Machine Code Hacking Driver -------------------------===// +//===-- llvm-mc.cpp - Machine Code Hacking Driver ---------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -39,6 +39,7 @@ #include "llvm/Support/TargetRegistry.h" #include "llvm/Support/TargetSelect.h" #include "llvm/Support/ToolOutputFile.h" + using namespace llvm; static cl::opt<std::string> @@ -234,7 +235,7 @@ static void setDwarfDebugFlags(int argc, char **argv) { } static std::string DwarfDebugProducer; -static void setDwarfDebugProducer(void) { +static void setDwarfDebugProducer() { if(!getenv("DEBUG_PRODUCER")) return; DwarfDebugProducer += getenv("DEBUG_PRODUCER"); diff --git a/tools/llvm-size/llvm-size.cpp b/tools/llvm-size/llvm-size.cpp index de2b0450523..bb299884f25 100644 --- a/tools/llvm-size/llvm-size.cpp +++ b/tools/llvm-size/llvm-size.cpp @@ -1,4 +1,4 @@ -//===-- llvm-size.cpp - Print the size of each object section -------------===// +//===-- llvm-size.cpp - Print the size of each object section ---*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -30,6 +30,7 @@ #include <algorithm> #include <string> #include <system_error> + using namespace llvm; using namespace object; @@ -98,7 +99,7 @@ static size_t getNumLengthAsString(uint64_t num) { } /// @brief Return the printing format for the Radix. -static const char *getRadixFmt(void) { +static const char *getRadixFmt() { switch (Radix) { case octal: return PRIo64; |