summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2022-01-09 12:21:02 -0800
committerKazu Hirata <kazu@google.com>2022-01-09 12:21:02 -0800
commitb12fd138127e368a5d78109bef77713c0bcd536e (patch)
tree347dc8600af5f7a303cd06ba641d4d01e522c209
parentac2090d507a67d1e98594d081ce3951837d43f28 (diff)
downloadllvm-b12fd138127e368a5d78109bef77713c0bcd536e.tar.gz
Fix bugprone argument comments.
Identified by bugprone-argument-comment.
-rw-r--r--clang-tools-extra/clang-tidy/cppcoreguidelines/VirtualClassDestructorCheck.cpp4
-rw-r--r--clang-tools-extra/clang-tidy/misc/DefinitionsInHeadersCheck.cpp2
-rw-r--r--clang-tools-extra/clangd/CodeComplete.cpp8
-rw-r--r--clang-tools-extra/clangd/SourceCode.cpp2
-rw-r--r--clang/lib/Sema/SemaTemplateDeduction.cpp2
-rw-r--r--lld/MachO/SyntheticSections.cpp6
-rw-r--r--lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp2
-rw-r--r--lldb/source/Expression/DWARFExpression.cpp2
-rw-r--r--lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp4
-rw-r--r--lldb/source/Symbol/Function.cpp2
-rw-r--r--lldb/source/Target/TraceInstructionDumper.cpp2
-rw-r--r--lldb/source/Utility/Reproducer.cpp2
-rw-r--r--polly/include/polly/ScopPass.h2
13 files changed, 20 insertions, 20 deletions
diff --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/VirtualClassDestructorCheck.cpp b/clang-tools-extra/clang-tidy/cppcoreguidelines/VirtualClassDestructorCheck.cpp
index fa5e06c8e7b2..d6af020326eb 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/VirtualClassDestructorCheck.cpp
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/VirtualClassDestructorCheck.cpp
@@ -173,11 +173,11 @@ void VirtualClassDestructorCheck::check(
"destructor of %0 is private and prevents using the type")
<< MatchedClassOrStruct;
diag(MatchedClassOrStruct->getLocation(),
- /*FixDescription=*/"make it public and virtual", DiagnosticIDs::Note)
+ /*Description=*/"make it public and virtual", DiagnosticIDs::Note)
<< changePrivateDestructorVisibilityTo(
"public", *Destructor, *Result.SourceManager, getLangOpts());
diag(MatchedClassOrStruct->getLocation(),
- /*FixDescription=*/"make it protected", DiagnosticIDs::Note)
+ /*Description=*/"make it protected", DiagnosticIDs::Note)
<< changePrivateDestructorVisibilityTo(
"protected", *Destructor, *Result.SourceManager, getLangOpts());
diff --git a/clang-tools-extra/clang-tidy/misc/DefinitionsInHeadersCheck.cpp b/clang-tools-extra/clang-tidy/misc/DefinitionsInHeadersCheck.cpp
index 882d254c6d9e..411d6db58243 100644
--- a/clang-tools-extra/clang-tidy/misc/DefinitionsInHeadersCheck.cpp
+++ b/clang-tools-extra/clang-tidy/misc/DefinitionsInHeadersCheck.cpp
@@ -130,7 +130,7 @@ void DefinitionsInHeadersCheck::check(const MatchFinder::MatchResult &Result) {
// inline is not allowed for main function.
if (FD->isMain())
return;
- diag(FD->getLocation(), /*FixDescription=*/"make as 'inline'",
+ diag(FD->getLocation(), /*Description=*/"make as 'inline'",
DiagnosticIDs::Note)
<< FixItHint::CreateInsertion(FD->getInnerLocStart(), "inline ");
} else if (const auto *VD = dyn_cast<VarDecl>(ND)) {
diff --git a/clang-tools-extra/clangd/CodeComplete.cpp b/clang-tools-extra/clangd/CodeComplete.cpp
index 50388e08c30a..d9165599fb9a 100644
--- a/clang-tools-extra/clangd/CodeComplete.cpp
+++ b/clang-tools-extra/clangd/CodeComplete.cpp
@@ -420,7 +420,7 @@ struct CodeCompletionBuilder {
SetDoc(C.IndexResult->Documentation);
} else if (C.SemaResult) {
const auto DocComment = getDocComment(*ASTCtx, *C.SemaResult,
- /*CommentsFromHeader=*/false);
+ /*CommentsFromHeaders=*/false);
SetDoc(formatDocumentation(*SemaCCS, DocComment));
}
}
@@ -959,9 +959,9 @@ public:
paramIndexForArg(Candidate, SigHelp.activeParameter);
}
- const auto *CCS =
- Candidate.CreateSignatureString(CurrentArg, S, *Allocator, CCTUInfo,
- /*IncludeBriefComment=*/true, Braced);
+ const auto *CCS = Candidate.CreateSignatureString(
+ CurrentArg, S, *Allocator, CCTUInfo,
+ /*IncludeBriefComments=*/true, Braced);
assert(CCS && "Expected the CodeCompletionString to be non-null");
ScoredSignatures.push_back(processOverloadCandidate(
Candidate, *CCS,
diff --git a/clang-tools-extra/clangd/SourceCode.cpp b/clang-tools-extra/clangd/SourceCode.cpp
index f3a60d641951..6f6d936ac3a7 100644
--- a/clang-tools-extra/clangd/SourceCode.cpp
+++ b/clang-tools-extra/clangd/SourceCode.cpp
@@ -457,7 +457,7 @@ llvm::Expected<SourceLocation> sourceLocationInMainFile(const SourceManager &SM,
Position P) {
llvm::StringRef Code = SM.getBufferOrFake(SM.getMainFileID()).getBuffer();
auto Offset =
- positionToOffset(Code, P, /*AllowColumnBeyondLineLength=*/false);
+ positionToOffset(Code, P, /*AllowColumnsBeyondLineLength=*/false);
if (!Offset)
return Offset.takeError();
return SM.getLocForStartOfFile(SM.getMainFileID()).getLocWithOffset(*Offset);
diff --git a/clang/lib/Sema/SemaTemplateDeduction.cpp b/clang/lib/Sema/SemaTemplateDeduction.cpp
index 8e1f1d294d6e..22dd395d9943 100644
--- a/clang/lib/Sema/SemaTemplateDeduction.cpp
+++ b/clang/lib/Sema/SemaTemplateDeduction.cpp
@@ -5355,7 +5355,7 @@ static bool isAtLeastAsSpecializedAs(Sema &S, QualType T1, QualType T2,
bool AtLeastAsSpecialized;
S.runWithSufficientStackSpace(Info.getLocation(), [&] {
AtLeastAsSpecialized = !FinishTemplateArgumentDeduction(
- S, P2, /*PartialOrdering=*/true,
+ S, P2, /*IsPartialOrdering=*/true,
TemplateArgumentList(TemplateArgumentList::OnStack,
TST1->template_arguments()),
Deduced, Info);
diff --git a/lld/MachO/SyntheticSections.cpp b/lld/MachO/SyntheticSections.cpp
index b64a9db485c5..398f2e7e1c09 100644
--- a/lld/MachO/SyntheticSections.cpp
+++ b/lld/MachO/SyntheticSections.cpp
@@ -1474,7 +1474,7 @@ void WordLiteralSection::writeTo(uint8_t *buf) const {
void macho::createSyntheticSymbols() {
auto addHeaderSymbol = [](const char *name) {
symtab->addSynthetic(name, in.header->isec, /*value=*/0,
- /*privateExtern=*/true, /*includeInSymtab=*/false,
+ /*isPrivateExtern=*/true, /*includeInSymtab=*/false,
/*referencedDynamically=*/false);
};
@@ -1487,11 +1487,11 @@ void macho::createSyntheticSymbols() {
// Otherwise, it's an absolute symbol.
if (config->isPic)
symtab->addSynthetic("__mh_execute_header", in.header->isec, /*value=*/0,
- /*privateExtern=*/false, /*includeInSymtab=*/true,
+ /*isPrivateExtern=*/false, /*includeInSymtab=*/true,
/*referencedDynamically=*/true);
else
symtab->addSynthetic("__mh_execute_header", /*isec=*/nullptr, /*value=*/0,
- /*privateExtern=*/false, /*includeInSymtab=*/true,
+ /*isPrivateExtern=*/false, /*includeInSymtab=*/true,
/*referencedDynamically=*/true);
break;
diff --git a/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp b/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp
index 435983769c05..4a11d82ecc6e 100644
--- a/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp
+++ b/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp
@@ -110,7 +110,7 @@ Searcher::CallbackReturn BreakpointResolverFileRegex::SearchCallback(
// TODO: Handle SourceLocationSpec column information
SourceLocationSpec location_spec(cu_file_spec, line_matches[i],
/*column=*/llvm::None,
- /*search_inlines=*/false, m_exact_match);
+ /*check_inlines=*/false, m_exact_match);
cu->ResolveSymbolContext(location_spec, eSymbolContextEverything, sc_list);
// Find all the function names:
if (!m_function_names.empty()) {
diff --git a/lldb/source/Expression/DWARFExpression.cpp b/lldb/source/Expression/DWARFExpression.cpp
index 890d8b5d3107..ccd41fb4a94e 100644
--- a/lldb/source/Expression/DWARFExpression.cpp
+++ b/lldb/source/Expression/DWARFExpression.cpp
@@ -825,7 +825,7 @@ static bool Evaluate_DW_OP_entry_value(std::vector<Value> &stack,
const DWARFExpression &param_expr = matched_param->LocationInCaller;
if (!param_expr.Evaluate(&parent_exe_ctx,
parent_frame->GetRegisterContext().get(),
- /*loclist_base_addr=*/LLDB_INVALID_ADDRESS,
+ /*loclist_base_load_addr=*/LLDB_INVALID_ADDRESS,
/*initial_value_ptr=*/nullptr,
/*object_address_ptr=*/nullptr, result, error_ptr)) {
LLDB_LOG(log,
diff --git a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
index d9cbcce22c52..188b6da7a712 100644
--- a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
+++ b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
@@ -338,7 +338,7 @@ bool DynamicLoaderPOSIXDYLD::SetRendezvousBreakpoint() {
dyld_break = target.CreateBreakpoint(
&containingModules, /*containingSourceFiles=*/nullptr,
DebugStateCandidates, eFunctionNameTypeFull, eLanguageTypeC,
- /*offset=*/0,
+ /*m_offset=*/0,
/*skip_prologue=*/eLazyBoolNo,
/*internal=*/true,
/*request_hardware=*/false);
@@ -348,7 +348,7 @@ bool DynamicLoaderPOSIXDYLD::SetRendezvousBreakpoint() {
dyld_break = target.CreateBreakpoint(
&containingModules, /*containingSourceFiles=*/nullptr,
DebugStateCandidates, eFunctionNameTypeFull, eLanguageTypeC,
- /*offset=*/0,
+ /*m_offset=*/0,
/*skip_prologue=*/eLazyBoolNo,
/*internal=*/true,
/*request_hardware=*/false);
diff --git a/lldb/source/Symbol/Function.cpp b/lldb/source/Symbol/Function.cpp
index 37479651fb45..dda9ec232715 100644
--- a/lldb/source/Symbol/Function.cpp
+++ b/lldb/source/Symbol/Function.cpp
@@ -195,7 +195,7 @@ Function *IndirectCallEdge::GetCallee(ModuleList &images,
Status error;
Value callee_addr_val;
if (!call_target.Evaluate(&exe_ctx, exe_ctx.GetRegisterContext(),
- /*loclist_base_addr=*/LLDB_INVALID_ADDRESS,
+ /*loclist_base_load_addr=*/LLDB_INVALID_ADDRESS,
/*initial_value_ptr=*/nullptr,
/*object_address_ptr=*/nullptr, callee_addr_val,
&error)) {
diff --git a/lldb/source/Target/TraceInstructionDumper.cpp b/lldb/source/Target/TraceInstructionDumper.cpp
index dc1e86481c36..69d59dcfb12f 100644
--- a/lldb/source/Target/TraceInstructionDumper.cpp
+++ b/lldb/source/Target/TraceInstructionDumper.cpp
@@ -137,7 +137,7 @@ DumpInstructionSymbolContext(Stream &s,
insn.sc.module_sp->GetFileSpec().GetFilename().AsCString());
else
insn.sc.DumpStopContext(&s, insn.exe_ctx.GetTargetPtr(), insn.address,
- /*show_fullpath=*/false,
+ /*show_fullpaths=*/false,
/*show_module=*/true, /*show_inlined_frames=*/false,
/*show_function_arguments=*/true,
/*show_function_name=*/true);
diff --git a/lldb/source/Utility/Reproducer.cpp b/lldb/source/Utility/Reproducer.cpp
index a306d6c1ef25..1e71dba472ed 100644
--- a/lldb/source/Utility/Reproducer.cpp
+++ b/lldb/source/Utility/Reproducer.cpp
@@ -362,7 +362,7 @@ llvm::Error repro::Finalize(Loader *loader) {
FileSpec mapping =
reproducer_root.CopyByAppendingPathComponent(FileProvider::Info::file);
- if (auto ec = collector.copyFiles(/*stop_on_error=*/false))
+ if (auto ec = collector.copyFiles(/*StopOnError=*/false))
return errorCodeToError(ec);
collector.writeMapping(mapping.GetPath());
diff --git a/polly/include/polly/ScopPass.h b/polly/include/polly/ScopPass.h
index 34eea0431f44..db910572bcc7 100644
--- a/polly/include/polly/ScopPass.h
+++ b/polly/include/polly/ScopPass.h
@@ -255,7 +255,7 @@ public:
while (!Worklist.empty()) {
Region *R = Worklist.pop_back_val();
- if (!SD.isMaxRegionInScop(*R, /*Verifying=*/false))
+ if (!SD.isMaxRegionInScop(*R, /*Verify=*/false))
continue;
Scop *scop = SI.getScop(R);
if (!scop)