diff options
author | Rui Ueyama <ruiu@google.com> | 2019-07-16 04:46:31 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2019-07-16 04:46:31 +0000 |
commit | ab48fc5ddcdca13212da491b2c1aaa9684ba4743 (patch) | |
tree | 782356cb10ba3144f9e17f029939f7c6ad6ee928 | |
parent | db0ba55c1efc9f6a34e8b5dde3f185b611101266 (diff) |
Fix parameter name comments using clang-tidy. NFC.
This patch applies clang-tidy's bugprone-argument-comment tool
to LLVM, clang and lld source trees. Here is how I created this
patch:
$ git clone https://github.com/llvm/llvm-project.git
$ cd llvm-project
$ mkdir build
$ cd build
$ cmake -GNinja -DCMAKE_BUILD_TYPE=Debug \
-DLLVM_ENABLE_PROJECTS='clang;lld;clang-tools-extra' \
-DCMAKE_EXPORT_COMPILE_COMMANDS=On -DLLVM_ENABLE_LLD=On \
-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ../llvm
$ ninja
$ parallel clang-tidy -checks='-*,bugprone-argument-comment' \
-config='{CheckOptions: [{key: StrictMode, value: 1}]}' -fix \
::: ../llvm/lib/**/*.{cpp,h} ../clang/lib/**/*.{cpp,h} ../lld/**/*.{cpp,h}
git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@366177 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | COFF/Driver.cpp | 4 | ||||
-rw-r--r-- | COFF/DriverUtils.cpp | 2 | ||||
-rw-r--r-- | ELF/Driver.cpp | 8 | ||||
-rw-r--r-- | ELF/InputFiles.cpp | 6 | ||||
-rw-r--r-- | ELF/ScriptParser.cpp | 12 | ||||
-rw-r--r-- | ELF/Thunks.cpp | 2 |
6 files changed, 17 insertions, 17 deletions
diff --git a/COFF/Driver.cpp b/COFF/Driver.cpp index d00393782..bb5c0bb71 100644 --- a/COFF/Driver.cpp +++ b/COFF/Driver.cpp @@ -1606,7 +1606,7 @@ void LinkerDriver::link(ArrayRef<const char *> argsArr) { // Handle generation of import library from a def file. if (!args.hasArg(OPT_INPUT)) { fixupExports(); - createImportLibrary(/*AsLib=*/true); + createImportLibrary(/*asLib=*/true); return; } @@ -1830,7 +1830,7 @@ void LinkerDriver::link(ArrayRef<const char *> argsArr) { // need to create a .lib file. if (!config->exports.empty() || config->dll) { fixupExports(); - createImportLibrary(/*AsLib=*/false); + createImportLibrary(/*asLib=*/false); assignExportOrdinals(); } diff --git a/COFF/DriverUtils.cpp b/COFF/DriverUtils.cpp index 59bdaec2e..edc3b3707 100644 --- a/COFF/DriverUtils.cpp +++ b/COFF/DriverUtils.cpp @@ -348,7 +348,7 @@ public: // IsVolatileSize=true forces MemoryBuffer to not use mmap(). return CHECK(MemoryBuffer::getFile(path, /*FileSize=*/-1, /*RequiresNullTerminator=*/false, - /*IsVolatileSize=*/true), + /*IsVolatile=*/true), "could not open " + path); } diff --git a/ELF/Driver.cpp b/ELF/Driver.cpp index f4f52b4b6..17c5860a0 100644 --- a/ELF/Driver.cpp +++ b/ELF/Driver.cpp @@ -272,7 +272,7 @@ void LinkerDriver::addFile(StringRef path, bool withLOption) { // Add a given library by searching it from input search paths. void LinkerDriver::addLibrary(StringRef name) { if (Optional<std::string> path = searchLibrary(name)) - addFile(*path, /*WithLOption=*/true); + addFile(*path, /*withLOption=*/true); else error("unable to find library -l" + name); } @@ -1118,7 +1118,7 @@ void LinkerDriver::createFiles(opt::InputArgList &args) { addLibrary(arg->getValue()); break; case OPT_INPUT: - addFile(arg->getValue(), /*WithLOption=*/false); + addFile(arg->getValue(), /*withLOption=*/false); break; case OPT_defsym: { StringRef from; @@ -1386,7 +1386,7 @@ static void replaceCommonSymbols() { bss->markDead(); inputSections.push_back(bss); s->replace(Defined{s->file, s->getName(), s->binding, s->stOther, s->type, - /*Value=*/0, s->size, bss}); + /*value=*/0, s->size, bss}); }); } @@ -1540,7 +1540,7 @@ template <class ELFT> void LinkerDriver::compileBitcodeFiles() { for (InputFile *file : lto->compile()) { auto *obj = cast<ObjFile<ELFT>>(file); - obj->parse(/*IgnoreComdats=*/true); + obj->parse(/*ignoreComdats=*/true); for (Symbol *sym : obj->getGlobalSymbols()) sym->parseSymbolVersion(); objectFiles.push_back(file); diff --git a/ELF/InputFiles.cpp b/ELF/InputFiles.cpp index 89b178dec..fda2a544a 100644 --- a/ELF/InputFiles.cpp +++ b/ELF/InputFiles.cpp @@ -552,11 +552,11 @@ static void addDependentLibrary(StringRef specifier, const InputFile *f) { if (!config->dependentLibraries) return; if (fs::exists(specifier)) - driver->addFile(specifier, /*WithLOption=*/false); + driver->addFile(specifier, /*withLOption=*/false); else if (Optional<std::string> s = findFromSearchPaths(specifier)) - driver->addFile(*s, /*WithLOption=*/true); + driver->addFile(*s, /*withLOption=*/true); else if (Optional<std::string> s = searchLibraryBaseName(specifier)) - driver->addFile(*s, /*WithLOption=*/true); + driver->addFile(*s, /*withLOption=*/true); else error(toString(f) + ": unable to find library from dependent library specifier: " + diff --git a/ELF/ScriptParser.cpp b/ELF/ScriptParser.cpp index e227d0bb7..8f0aa6601 100644 --- a/ELF/ScriptParser.cpp +++ b/ELF/ScriptParser.cpp @@ -280,26 +280,26 @@ void ScriptParser::addFile(StringRef s) { SmallString<128> pathData; StringRef path = (config->sysroot + s).toStringRef(pathData); if (sys::fs::exists(path)) { - driver->addFile(saver.save(path), /*WithLOption=*/false); + driver->addFile(saver.save(path), /*withLOption=*/false); return; } } if (s.startswith("/")) { - driver->addFile(s, /*WithLOption=*/false); + driver->addFile(s, /*withLOption=*/false); } else if (s.startswith("=")) { if (config->sysroot.empty()) - driver->addFile(s.substr(1), /*WithLOption=*/false); + driver->addFile(s.substr(1), /*withLOption=*/false); else driver->addFile(saver.save(config->sysroot + "/" + s.substr(1)), - /*WithLOption=*/false); + /*withLOption=*/false); } else if (s.startswith("-l")) { driver->addLibrary(s.substr(2)); } else if (sys::fs::exists(s)) { - driver->addFile(s, /*WithLOption=*/false); + driver->addFile(s, /*withLOption=*/false); } else { if (Optional<std::string> path = findFromSearchPaths(s)) - driver->addFile(saver.save(*path), /*WithLOption=*/true); + driver->addFile(saver.save(*path), /*withLOption=*/true); else setError("unable to find " + s); } diff --git a/ELF/Thunks.cpp b/ELF/Thunks.cpp index 33a3c87af..32e935126 100644 --- a/ELF/Thunks.cpp +++ b/ELF/Thunks.cpp @@ -319,7 +319,7 @@ public: Defined *Thunk::addSymbol(StringRef name, uint8_t type, uint64_t value, InputSectionBase §ion) { - Defined *d = addSyntheticLocal(name, type, value, /*Size=*/0, section); + Defined *d = addSyntheticLocal(name, type, value, /*size=*/0, section); syms.push_back(d); return d; } |