Fix bugprone argument comments.
Identified by bugprone-argument-comment.
This commit is contained in:
parent
ac2090d507
commit
b12fd13812
|
@ -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());
|
||||
|
||||
|
|
|
@ -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)) {
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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()) {
|
||||
|
|
|
@ -825,7 +825,7 @@ static bool Evaluate_DW_OP_entry_value(std::vector<Value> &stack,
|
|||
const DWARFExpression ¶m_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,
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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());
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue