forked from OSchip/llvm-project
[clang] Fix bugprone argument comments (NFC)
Identified with bugprone-argument-comment.
This commit is contained in:
parent
40446663c7
commit
17d4bd3d78
|
@ -413,12 +413,12 @@ public:
|
||||||
friend ASTStmtWriter;
|
friend ASTStmtWriter;
|
||||||
|
|
||||||
NestedRequirement(SubstitutionDiagnostic *SubstDiag) :
|
NestedRequirement(SubstitutionDiagnostic *SubstDiag) :
|
||||||
Requirement(RK_Nested, /*Dependent=*/false,
|
Requirement(RK_Nested, /*IsDependent=*/false,
|
||||||
/*ContainsUnexpandedParameterPack*/false,
|
/*ContainsUnexpandedParameterPack*/false,
|
||||||
/*Satisfied=*/false), Value(SubstDiag) {}
|
/*IsSatisfied=*/false), Value(SubstDiag) {}
|
||||||
|
|
||||||
NestedRequirement(Expr *Constraint) :
|
NestedRequirement(Expr *Constraint) :
|
||||||
Requirement(RK_Nested, /*Dependent=*/true,
|
Requirement(RK_Nested, /*IsDependent=*/true,
|
||||||
Constraint->containsUnexpandedParameterPack()),
|
Constraint->containsUnexpandedParameterPack()),
|
||||||
Value(Constraint) {
|
Value(Constraint) {
|
||||||
assert(Constraint->isInstantiationDependent() &&
|
assert(Constraint->isInstantiationDependent() &&
|
||||||
|
|
|
@ -10312,7 +10312,7 @@ QualType ASTContext::getCorrespondingUnsignedType(QualType T) const {
|
||||||
|
|
||||||
// For _BitInt, return an unsigned _BitInt with same width.
|
// For _BitInt, return an unsigned _BitInt with same width.
|
||||||
if (const auto *EITy = T->getAs<BitIntType>())
|
if (const auto *EITy = T->getAs<BitIntType>())
|
||||||
return getBitIntType(/*IsUnsigned=*/true, EITy->getNumBits());
|
return getBitIntType(/*Unsigned=*/true, EITy->getNumBits());
|
||||||
|
|
||||||
// For enums, get the underlying integer type of the enum, and let the general
|
// For enums, get the underlying integer type of the enum, and let the general
|
||||||
// integer type signchanging code handle it.
|
// integer type signchanging code handle it.
|
||||||
|
@ -10380,7 +10380,7 @@ QualType ASTContext::getCorrespondingSignedType(QualType T) const {
|
||||||
|
|
||||||
// For _BitInt, return a signed _BitInt with same width.
|
// For _BitInt, return a signed _BitInt with same width.
|
||||||
if (const auto *EITy = T->getAs<BitIntType>())
|
if (const auto *EITy = T->getAs<BitIntType>())
|
||||||
return getBitIntType(/*IsUnsigned=*/false, EITy->getNumBits());
|
return getBitIntType(/*Unsigned=*/false, EITy->getNumBits());
|
||||||
|
|
||||||
// For enums, get the underlying integer type of the enum, and let the general
|
// For enums, get the underlying integer type of the enum, and let the general
|
||||||
// integer type signchanging code handle it.
|
// integer type signchanging code handle it.
|
||||||
|
|
|
@ -207,13 +207,13 @@ bool ByteCodeExprGen<Emitter>::VisitBinaryOperator(const BinaryOperator *BO) {
|
||||||
|
|
||||||
template <class Emitter>
|
template <class Emitter>
|
||||||
bool ByteCodeExprGen<Emitter>::discard(const Expr *E) {
|
bool ByteCodeExprGen<Emitter>::discard(const Expr *E) {
|
||||||
OptionScope<Emitter> Scope(this, /*discardResult=*/true);
|
OptionScope<Emitter> Scope(this, /*NewDiscardResult=*/true);
|
||||||
return this->Visit(E);
|
return this->Visit(E);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Emitter>
|
template <class Emitter>
|
||||||
bool ByteCodeExprGen<Emitter>::visit(const Expr *E) {
|
bool ByteCodeExprGen<Emitter>::visit(const Expr *E) {
|
||||||
OptionScope<Emitter> Scope(this, /*discardResult=*/false);
|
OptionScope<Emitter> Scope(this, /*NewDiscardResult=*/false);
|
||||||
return this->Visit(E);
|
return this->Visit(E);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -518,7 +518,7 @@ OMPSectionDirective *OMPSectionDirective::Create(const ASTContext &C,
|
||||||
bool HasCancel) {
|
bool HasCancel) {
|
||||||
auto *Dir =
|
auto *Dir =
|
||||||
createDirective<OMPSectionDirective>(C, llvm::None, AssociatedStmt,
|
createDirective<OMPSectionDirective>(C, llvm::None, AssociatedStmt,
|
||||||
/*NumChildre=*/0, StartLoc, EndLoc);
|
/*NumChildren=*/0, StartLoc, EndLoc);
|
||||||
Dir->setHasCancel(HasCancel);
|
Dir->setHasCancel(HasCancel);
|
||||||
return Dir;
|
return Dir;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10584,7 +10584,7 @@ void CGOpenMPRuntime::emitTargetCall(
|
||||||
emitOffloadingArraysArgument(
|
emitOffloadingArraysArgument(
|
||||||
CGF, Info.BasePointersArray, Info.PointersArray, Info.SizesArray,
|
CGF, Info.BasePointersArray, Info.PointersArray, Info.SizesArray,
|
||||||
Info.MapTypesArray, Info.MapNamesArray, Info.MappersArray, Info,
|
Info.MapTypesArray, Info.MapNamesArray, Info.MappersArray, Info,
|
||||||
{/*ForEndTask=*/false});
|
{/*ForEndCall=*/false});
|
||||||
|
|
||||||
InputInfo.NumberOfTargetItems = Info.NumberOfPtrs;
|
InputInfo.NumberOfTargetItems = Info.NumberOfPtrs;
|
||||||
InputInfo.BasePointersArray =
|
InputInfo.BasePointersArray =
|
||||||
|
@ -11466,7 +11466,7 @@ void CGOpenMPRuntime::emitTargetDataStandAloneCall(
|
||||||
emitOffloadingArraysArgument(
|
emitOffloadingArraysArgument(
|
||||||
CGF, Info.BasePointersArray, Info.PointersArray, Info.SizesArray,
|
CGF, Info.BasePointersArray, Info.PointersArray, Info.SizesArray,
|
||||||
Info.MapTypesArray, Info.MapNamesArray, Info.MappersArray, Info,
|
Info.MapTypesArray, Info.MapNamesArray, Info.MappersArray, Info,
|
||||||
{/*ForEndTask=*/false});
|
{/*ForEndCall=*/false});
|
||||||
InputInfo.NumberOfTargetItems = Info.NumberOfPtrs;
|
InputInfo.NumberOfTargetItems = Info.NumberOfPtrs;
|
||||||
InputInfo.BasePointersArray =
|
InputInfo.BasePointersArray =
|
||||||
Address(Info.BasePointersArray, CGM.getPointerAlign());
|
Address(Info.BasePointersArray, CGM.getPointerAlign());
|
||||||
|
|
|
@ -411,7 +411,7 @@ CGRecordLowering::accumulateBitFields(RecordDecl::field_iterator Field,
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
llvm::Type *Type =
|
llvm::Type *Type =
|
||||||
Types.ConvertTypeForMem(Field->getType(), /*ForBitFields=*/true);
|
Types.ConvertTypeForMem(Field->getType(), /*ForBitField=*/true);
|
||||||
// If we don't have a run yet, or don't live within the previous run's
|
// If we don't have a run yet, or don't live within the previous run's
|
||||||
// allocated storage then we allocate some storage and start a new run.
|
// allocated storage then we allocate some storage and start a new run.
|
||||||
if (Run == FieldEnd || BitOffset >= Tail) {
|
if (Run == FieldEnd || BitOffset >= Tail) {
|
||||||
|
|
|
@ -817,7 +817,7 @@ std::unique_ptr<ASTUnit> ASTUnit::LoadFromASTFile(
|
||||||
AST->Reader = new ASTReader(
|
AST->Reader = new ASTReader(
|
||||||
PP, *AST->ModuleCache, AST->Ctx.get(), PCHContainerRdr, {},
|
PP, *AST->ModuleCache, AST->Ctx.get(), PCHContainerRdr, {},
|
||||||
/*isysroot=*/"",
|
/*isysroot=*/"",
|
||||||
/*DisableValidation=*/disableValid, AllowASTWithCompilerErrors);
|
/*DisableValidationKind=*/disableValid, AllowASTWithCompilerErrors);
|
||||||
|
|
||||||
AST->Reader->setListener(std::make_unique<ASTInfoCollector>(
|
AST->Reader->setListener(std::make_unique<ASTInfoCollector>(
|
||||||
*AST->PP, AST->Ctx.get(), *AST->HSOpts, *AST->PPOpts, *AST->LangOpts,
|
*AST->PP, AST->Ctx.get(), *AST->HSOpts, *AST->PPOpts, *AST->LangOpts,
|
||||||
|
|
|
@ -4538,7 +4538,7 @@ void Parser::ParseEnumSpecifier(SourceLocation StartLoc, DeclSpec &DS,
|
||||||
|
|
||||||
CXXScopeSpec Spec;
|
CXXScopeSpec Spec;
|
||||||
if (ParseOptionalCXXScopeSpecifier(Spec, /*ObjectType=*/nullptr,
|
if (ParseOptionalCXXScopeSpecifier(Spec, /*ObjectType=*/nullptr,
|
||||||
/*ObjectHadErrors=*/false,
|
/*ObjectHasErrors=*/false,
|
||||||
/*EnteringContext=*/true))
|
/*EnteringContext=*/true))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -5422,7 +5422,7 @@ bool Parser::isConstructorDeclarator(bool IsUnqualified, bool DeductionGuide) {
|
||||||
// Parse the C++ scope specifier.
|
// Parse the C++ scope specifier.
|
||||||
CXXScopeSpec SS;
|
CXXScopeSpec SS;
|
||||||
if (ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/nullptr,
|
if (ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/nullptr,
|
||||||
/*ObjectHadErrors=*/false,
|
/*ObjectHasErrors=*/false,
|
||||||
/*EnteringContext=*/true)) {
|
/*EnteringContext=*/true)) {
|
||||||
TPA.Revert();
|
TPA.Revert();
|
||||||
return false;
|
return false;
|
||||||
|
@ -5804,7 +5804,7 @@ void Parser::ParseDeclaratorInternal(Declarator &D,
|
||||||
D.getContext() == DeclaratorContext::Member;
|
D.getContext() == DeclaratorContext::Member;
|
||||||
CXXScopeSpec SS;
|
CXXScopeSpec SS;
|
||||||
ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/nullptr,
|
ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/nullptr,
|
||||||
/*ObjectHadErrors=*/false, EnteringContext);
|
/*ObjectHasErrors=*/false, EnteringContext);
|
||||||
|
|
||||||
if (SS.isNotEmpty()) {
|
if (SS.isNotEmpty()) {
|
||||||
if (Tok.isNot(tok::star)) {
|
if (Tok.isNot(tok::star)) {
|
||||||
|
@ -6033,7 +6033,7 @@ void Parser::ParseDirectDeclarator(Declarator &D) {
|
||||||
D.getContext() == DeclaratorContext::Member;
|
D.getContext() == DeclaratorContext::Member;
|
||||||
ParseOptionalCXXScopeSpecifier(
|
ParseOptionalCXXScopeSpecifier(
|
||||||
D.getCXXScopeSpec(), /*ObjectType=*/nullptr,
|
D.getCXXScopeSpec(), /*ObjectType=*/nullptr,
|
||||||
/*ObjectHadErrors=*/false, EnteringContext);
|
/*ObjectHasErrors=*/false, EnteringContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (D.getCXXScopeSpec().isValid()) {
|
if (D.getCXXScopeSpec().isValid()) {
|
||||||
|
|
|
@ -291,7 +291,7 @@ Decl *Parser::ParseNamespaceAlias(SourceLocation NamespaceLoc,
|
||||||
CXXScopeSpec SS;
|
CXXScopeSpec SS;
|
||||||
// Parse (optional) nested-name-specifier.
|
// Parse (optional) nested-name-specifier.
|
||||||
ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/nullptr,
|
ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/nullptr,
|
||||||
/*ObjectHadErrors=*/false,
|
/*ObjectHasErrors=*/false,
|
||||||
/*EnteringContext=*/false,
|
/*EnteringContext=*/false,
|
||||||
/*MayBePseudoDestructor=*/nullptr,
|
/*MayBePseudoDestructor=*/nullptr,
|
||||||
/*IsTypename=*/false,
|
/*IsTypename=*/false,
|
||||||
|
@ -529,7 +529,7 @@ Decl *Parser::ParseUsingDirective(DeclaratorContext Context,
|
||||||
CXXScopeSpec SS;
|
CXXScopeSpec SS;
|
||||||
// Parse (optional) nested-name-specifier.
|
// Parse (optional) nested-name-specifier.
|
||||||
ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/nullptr,
|
ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/nullptr,
|
||||||
/*ObjectHadErrors=*/false,
|
/*ObjectHasErrors=*/false,
|
||||||
/*EnteringContext=*/false,
|
/*EnteringContext=*/false,
|
||||||
/*MayBePseudoDestructor=*/nullptr,
|
/*MayBePseudoDestructor=*/nullptr,
|
||||||
/*IsTypename=*/false,
|
/*IsTypename=*/false,
|
||||||
|
@ -598,7 +598,7 @@ bool Parser::ParseUsingDeclarator(DeclaratorContext Context,
|
||||||
// Parse nested-name-specifier.
|
// Parse nested-name-specifier.
|
||||||
IdentifierInfo *LastII = nullptr;
|
IdentifierInfo *LastII = nullptr;
|
||||||
if (ParseOptionalCXXScopeSpecifier(D.SS, /*ObjectType=*/nullptr,
|
if (ParseOptionalCXXScopeSpecifier(D.SS, /*ObjectType=*/nullptr,
|
||||||
/*ObjectHadErrors=*/false,
|
/*ObjectHasErrors=*/false,
|
||||||
/*EnteringContext=*/false,
|
/*EnteringContext=*/false,
|
||||||
/*MayBePseudoDtor=*/nullptr,
|
/*MayBePseudoDtor=*/nullptr,
|
||||||
/*IsTypename=*/false,
|
/*IsTypename=*/false,
|
||||||
|
@ -1190,7 +1190,7 @@ TypeResult Parser::ParseBaseTypeSpecifier(SourceLocation &BaseLoc,
|
||||||
// Parse optional nested-name-specifier
|
// Parse optional nested-name-specifier
|
||||||
CXXScopeSpec SS;
|
CXXScopeSpec SS;
|
||||||
if (ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/nullptr,
|
if (ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/nullptr,
|
||||||
/*ObjectHadErrors=*/false,
|
/*ObjectHasErrors=*/false,
|
||||||
/*EnteringContext=*/false))
|
/*EnteringContext=*/false))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
@ -1609,7 +1609,7 @@ void Parser::ParseClassSpecifier(tok::TokenKind TagTokKind,
|
||||||
CXXScopeSpec Spec;
|
CXXScopeSpec Spec;
|
||||||
bool HasValidSpec = true;
|
bool HasValidSpec = true;
|
||||||
if (ParseOptionalCXXScopeSpecifier(Spec, /*ObjectType=*/nullptr,
|
if (ParseOptionalCXXScopeSpecifier(Spec, /*ObjectType=*/nullptr,
|
||||||
/*ObjectHadErrors=*/false,
|
/*ObjectHasErrors=*/false,
|
||||||
EnteringContext)) {
|
EnteringContext)) {
|
||||||
DS.SetTypeSpecError();
|
DS.SetTypeSpecError();
|
||||||
HasValidSpec = false;
|
HasValidSpec = false;
|
||||||
|
@ -2605,7 +2605,7 @@ Parser::ParseCXXClassMemberDeclaration(AccessSpecifier AS,
|
||||||
// Collect the scope specifier token we annotated earlier.
|
// Collect the scope specifier token we annotated earlier.
|
||||||
CXXScopeSpec SS;
|
CXXScopeSpec SS;
|
||||||
ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/nullptr,
|
ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/nullptr,
|
||||||
/*ObjectHadErrors=*/false,
|
/*ObjectHasErrors=*/false,
|
||||||
/*EnteringContext=*/false);
|
/*EnteringContext=*/false);
|
||||||
|
|
||||||
if (SS.isInvalid()) {
|
if (SS.isInvalid()) {
|
||||||
|
@ -3674,7 +3674,7 @@ MemInitResult Parser::ParseMemInitializer(Decl *ConstructorDecl) {
|
||||||
// parse '::'[opt] nested-name-specifier[opt]
|
// parse '::'[opt] nested-name-specifier[opt]
|
||||||
CXXScopeSpec SS;
|
CXXScopeSpec SS;
|
||||||
if (ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/nullptr,
|
if (ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/nullptr,
|
||||||
/*ObjectHadErrors=*/false,
|
/*ObjectHasErrors=*/false,
|
||||||
/*EnteringContext=*/false))
|
/*EnteringContext=*/false))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
|
@ -1588,7 +1588,7 @@ ExprResult Parser::ParseCastExpression(CastParseKind ParseKind,
|
||||||
// cast expression.
|
// cast expression.
|
||||||
CXXScopeSpec SS;
|
CXXScopeSpec SS;
|
||||||
ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/nullptr,
|
ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/nullptr,
|
||||||
/*ObjectHadErrors=*/false,
|
/*ObjectHasErrors=*/false,
|
||||||
/*EnteringContext=*/false);
|
/*EnteringContext=*/false);
|
||||||
AnnotateTemplateIdTokenAsType(SS);
|
AnnotateTemplateIdTokenAsType(SS);
|
||||||
return ParseCastExpression(ParseKind, isAddressOfOperand, NotCastExpr,
|
return ParseCastExpression(ParseKind, isAddressOfOperand, NotCastExpr,
|
||||||
|
|
|
@ -668,7 +668,7 @@ ExprResult Parser::ParseCXXIdExpression(bool isAddressOfOperand) {
|
||||||
//
|
//
|
||||||
CXXScopeSpec SS;
|
CXXScopeSpec SS;
|
||||||
ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/nullptr,
|
ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/nullptr,
|
||||||
/*ObjectHadErrors=*/false,
|
/*ObjectHasErrors=*/false,
|
||||||
/*EnteringContext=*/false);
|
/*EnteringContext=*/false);
|
||||||
|
|
||||||
Token Replacement;
|
Token Replacement;
|
||||||
|
|
|
@ -2937,7 +2937,7 @@ bool Parser::ParseOpenMPSimpleVarList(
|
||||||
|
|
||||||
if (AllowScopeSpecifier && getLangOpts().CPlusPlus &&
|
if (AllowScopeSpecifier && getLangOpts().CPlusPlus &&
|
||||||
ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/nullptr,
|
ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/nullptr,
|
||||||
/*ObjectHadErrors=*/false, false)) {
|
/*ObjectHasErrors=*/false, false)) {
|
||||||
IsCorrect = false;
|
IsCorrect = false;
|
||||||
SkipUntil(tok::comma, tok::r_paren, tok::annot_pragma_openmp_end,
|
SkipUntil(tok::comma, tok::r_paren, tok::annot_pragma_openmp_end,
|
||||||
StopBeforeMatch);
|
StopBeforeMatch);
|
||||||
|
@ -3818,7 +3818,7 @@ bool Parser::parseMapperModifier(OpenMPVarListDataTy &Data) {
|
||||||
if (getLangOpts().CPlusPlus)
|
if (getLangOpts().CPlusPlus)
|
||||||
ParseOptionalCXXScopeSpecifier(Data.ReductionOrMapperIdScopeSpec,
|
ParseOptionalCXXScopeSpecifier(Data.ReductionOrMapperIdScopeSpec,
|
||||||
/*ObjectType=*/nullptr,
|
/*ObjectType=*/nullptr,
|
||||||
/*ObjectHadErrors=*/false,
|
/*ObjectHasErrors=*/false,
|
||||||
/*EnteringContext=*/false);
|
/*EnteringContext=*/false);
|
||||||
if (Tok.isNot(tok::identifier) && Tok.isNot(tok::kw_default)) {
|
if (Tok.isNot(tok::identifier) && Tok.isNot(tok::kw_default)) {
|
||||||
Diag(Tok.getLocation(), diag::err_omp_mapper_illegal_identifier);
|
Diag(Tok.getLocation(), diag::err_omp_mapper_illegal_identifier);
|
||||||
|
@ -4051,7 +4051,7 @@ bool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind,
|
||||||
if (getLangOpts().CPlusPlus)
|
if (getLangOpts().CPlusPlus)
|
||||||
ParseOptionalCXXScopeSpecifier(Data.ReductionOrMapperIdScopeSpec,
|
ParseOptionalCXXScopeSpecifier(Data.ReductionOrMapperIdScopeSpec,
|
||||||
/*ObjectType=*/nullptr,
|
/*ObjectType=*/nullptr,
|
||||||
/*ObjectHadErrors=*/false,
|
/*ObjectHasErrors=*/false,
|
||||||
/*EnteringContext=*/false);
|
/*EnteringContext=*/false);
|
||||||
InvalidReductionId = ParseReductionId(
|
InvalidReductionId = ParseReductionId(
|
||||||
*this, Data.ReductionOrMapperIdScopeSpec, UnqualifiedReductionId);
|
*this, Data.ReductionOrMapperIdScopeSpec, UnqualifiedReductionId);
|
||||||
|
|
|
@ -222,7 +222,7 @@ ExprResult Parser::ParseMSAsmIdentifier(llvm::SmallVectorImpl<Token> &LineToks,
|
||||||
CXXScopeSpec SS;
|
CXXScopeSpec SS;
|
||||||
if (getLangOpts().CPlusPlus)
|
if (getLangOpts().CPlusPlus)
|
||||||
ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/nullptr,
|
ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/nullptr,
|
||||||
/*ObjectHadErrors=*/false,
|
/*ObjectHasErrors=*/false,
|
||||||
/*EnteringContext=*/false);
|
/*EnteringContext=*/false);
|
||||||
|
|
||||||
// Require an identifier here.
|
// Require an identifier here.
|
||||||
|
|
|
@ -391,7 +391,7 @@ Parser::ParseConceptDefinition(const ParsedTemplateInfo &TemplateInfo,
|
||||||
CXXScopeSpec SS;
|
CXXScopeSpec SS;
|
||||||
if (ParseOptionalCXXScopeSpecifier(
|
if (ParseOptionalCXXScopeSpecifier(
|
||||||
SS, /*ObjectType=*/nullptr,
|
SS, /*ObjectType=*/nullptr,
|
||||||
/*ObjectHadErrors=*/false, /*EnteringContext=*/false,
|
/*ObjectHasErrors=*/false, /*EnteringContext=*/false,
|
||||||
/*MayBePseudoDestructor=*/nullptr,
|
/*MayBePseudoDestructor=*/nullptr,
|
||||||
/*IsTypename=*/false, /*LastII=*/nullptr, /*OnlyNamespace=*/true) ||
|
/*IsTypename=*/false, /*LastII=*/nullptr, /*OnlyNamespace=*/true) ||
|
||||||
SS.isInvalid()) {
|
SS.isInvalid()) {
|
||||||
|
@ -715,7 +715,7 @@ bool Parser::TryAnnotateTypeConstraint() {
|
||||||
CXXScopeSpec SS;
|
CXXScopeSpec SS;
|
||||||
bool WasScopeAnnotation = Tok.is(tok::annot_cxxscope);
|
bool WasScopeAnnotation = Tok.is(tok::annot_cxxscope);
|
||||||
if (ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/nullptr,
|
if (ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/nullptr,
|
||||||
/*ObjectHadErrors=*/false,
|
/*ObjectHasErrors=*/false,
|
||||||
/*EnteringContext=*/false,
|
/*EnteringContext=*/false,
|
||||||
/*MayBePseudoDestructor=*/nullptr,
|
/*MayBePseudoDestructor=*/nullptr,
|
||||||
// If this is not a type-constraint, then
|
// If this is not a type-constraint, then
|
||||||
|
@ -787,7 +787,7 @@ NamedDecl *Parser::ParseTypeParameter(unsigned Depth, unsigned Position) {
|
||||||
bool TypenameKeyword = false;
|
bool TypenameKeyword = false;
|
||||||
SourceLocation KeyLoc;
|
SourceLocation KeyLoc;
|
||||||
ParseOptionalCXXScopeSpecifier(TypeConstraintSS, /*ObjectType=*/nullptr,
|
ParseOptionalCXXScopeSpecifier(TypeConstraintSS, /*ObjectType=*/nullptr,
|
||||||
/*ObjectHadErrors=*/false,
|
/*ObjectHasErrors=*/false,
|
||||||
/*EnteringContext*/ false);
|
/*EnteringContext*/ false);
|
||||||
if (Tok.is(tok::annot_template_id)) {
|
if (Tok.is(tok::annot_template_id)) {
|
||||||
// Consume the 'type-constraint'.
|
// Consume the 'type-constraint'.
|
||||||
|
@ -1468,7 +1468,7 @@ ParsedTemplateArgument Parser::ParseTemplateTemplateArgument() {
|
||||||
// '>', or (in some cases) '>>'.
|
// '>', or (in some cases) '>>'.
|
||||||
CXXScopeSpec SS; // nested-name-specifier, if present
|
CXXScopeSpec SS; // nested-name-specifier, if present
|
||||||
ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/nullptr,
|
ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/nullptr,
|
||||||
/*ObjectHadErrors=*/false,
|
/*ObjectHasErrors=*/false,
|
||||||
/*EnteringContext=*/false);
|
/*EnteringContext=*/false);
|
||||||
|
|
||||||
ParsedTemplateArgument Result;
|
ParsedTemplateArgument Result;
|
||||||
|
|
|
@ -1634,7 +1634,7 @@ Parser::TryAnnotateName(CorrectionCandidateCallback *CCC) {
|
||||||
CXXScopeSpec SS;
|
CXXScopeSpec SS;
|
||||||
if (getLangOpts().CPlusPlus &&
|
if (getLangOpts().CPlusPlus &&
|
||||||
ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/nullptr,
|
ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/nullptr,
|
||||||
/*ObjectHadErrors=*/false,
|
/*ObjectHasErrors=*/false,
|
||||||
EnteringContext))
|
EnteringContext))
|
||||||
return ANK_Error;
|
return ANK_Error;
|
||||||
|
|
||||||
|
@ -1882,7 +1882,7 @@ bool Parser::TryAnnotateTypeOrScopeToken() {
|
||||||
SourceLocation TypenameLoc = ConsumeToken();
|
SourceLocation TypenameLoc = ConsumeToken();
|
||||||
CXXScopeSpec SS;
|
CXXScopeSpec SS;
|
||||||
if (ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/nullptr,
|
if (ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/nullptr,
|
||||||
/*ObjectHadErrors=*/false,
|
/*ObjectHasErrors=*/false,
|
||||||
/*EnteringContext=*/false, nullptr,
|
/*EnteringContext=*/false, nullptr,
|
||||||
/*IsTypename*/ true))
|
/*IsTypename*/ true))
|
||||||
return true;
|
return true;
|
||||||
|
@ -1953,7 +1953,7 @@ bool Parser::TryAnnotateTypeOrScopeToken() {
|
||||||
CXXScopeSpec SS;
|
CXXScopeSpec SS;
|
||||||
if (getLangOpts().CPlusPlus)
|
if (getLangOpts().CPlusPlus)
|
||||||
if (ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/nullptr,
|
if (ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/nullptr,
|
||||||
/*ObjectHadErrors=*/false,
|
/*ObjectHasErrors=*/false,
|
||||||
/*EnteringContext*/ false))
|
/*EnteringContext*/ false))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
@ -2084,7 +2084,7 @@ bool Parser::TryAnnotateCXXScopeToken(bool EnteringContext) {
|
||||||
|
|
||||||
CXXScopeSpec SS;
|
CXXScopeSpec SS;
|
||||||
if (ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/nullptr,
|
if (ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/nullptr,
|
||||||
/*ObjectHadErrors=*/false,
|
/*ObjectHasErrors=*/false,
|
||||||
EnteringContext))
|
EnteringContext))
|
||||||
return true;
|
return true;
|
||||||
if (SS.isEmpty())
|
if (SS.isEmpty())
|
||||||
|
@ -2195,7 +2195,7 @@ bool Parser::ParseMicrosoftIfExistsCondition(IfExistsCondition& Result) {
|
||||||
// Parse nested-name-specifier.
|
// Parse nested-name-specifier.
|
||||||
if (getLangOpts().CPlusPlus)
|
if (getLangOpts().CPlusPlus)
|
||||||
ParseOptionalCXXScopeSpecifier(Result.SS, /*ObjectType=*/nullptr,
|
ParseOptionalCXXScopeSpecifier(Result.SS, /*ObjectType=*/nullptr,
|
||||||
/*ObjectHadErrors=*/false,
|
/*ObjectHasErrors=*/false,
|
||||||
/*EnteringContext=*/false);
|
/*EnteringContext=*/false);
|
||||||
|
|
||||||
// Check nested-name specifier.
|
// Check nested-name specifier.
|
||||||
|
|
|
@ -18586,7 +18586,7 @@ void Sema::ActOnPragmaRedefineExtname(IdentifierInfo* Name,
|
||||||
AttributeCommonInfo Info(AliasName, SourceRange(AliasNameLoc),
|
AttributeCommonInfo Info(AliasName, SourceRange(AliasNameLoc),
|
||||||
AttributeCommonInfo::AS_Pragma);
|
AttributeCommonInfo::AS_Pragma);
|
||||||
AsmLabelAttr *Attr = AsmLabelAttr::CreateImplicit(
|
AsmLabelAttr *Attr = AsmLabelAttr::CreateImplicit(
|
||||||
Context, AliasName->getName(), /*LiteralLabel=*/true, Info);
|
Context, AliasName->getName(), /*IsLiteralLabel=*/true, Info);
|
||||||
|
|
||||||
// If a declaration that:
|
// If a declaration that:
|
||||||
// 1) declares a function or a variable
|
// 1) declares a function or a variable
|
||||||
|
|
|
@ -8697,7 +8697,7 @@ Sema::ActOnTypeRequirement(SourceLocation TypenameKWLoc, CXXScopeSpec &SS,
|
||||||
if (TypeName) {
|
if (TypeName) {
|
||||||
QualType T = CheckTypenameType(ETK_Typename, TypenameKWLoc,
|
QualType T = CheckTypenameType(ETK_Typename, TypenameKWLoc,
|
||||||
SS.getWithLocInContext(Context), *TypeName,
|
SS.getWithLocInContext(Context), *TypeName,
|
||||||
NameLoc, &TSI, /*DeducedTypeContext=*/false);
|
NameLoc, &TSI, /*DeducedTSTContext=*/false);
|
||||||
if (T.isNull())
|
if (T.isNull())
|
||||||
return nullptr;
|
return nullptr;
|
||||||
} else {
|
} else {
|
||||||
|
@ -8748,7 +8748,7 @@ Sema::ActOnCompoundRequirement(
|
||||||
/*HasTypeConstraint=*/true);
|
/*HasTypeConstraint=*/true);
|
||||||
|
|
||||||
if (BuildTypeConstraint(SS, TypeConstraint, TParam,
|
if (BuildTypeConstraint(SS, TypeConstraint, TParam,
|
||||||
/*EllpsisLoc=*/SourceLocation(),
|
/*EllipsisLoc=*/SourceLocation(),
|
||||||
/*AllowUnexpandedPack=*/true))
|
/*AllowUnexpandedPack=*/true))
|
||||||
// Just produce a requirement with no type requirements.
|
// Just produce a requirement with no type requirements.
|
||||||
return BuildExprRequirement(E, /*IsSimple=*/false, NoexceptLoc, {});
|
return BuildExprRequirement(E, /*IsSimple=*/false, NoexceptLoc, {});
|
||||||
|
|
|
@ -1280,11 +1280,11 @@ static ObjCMethodDecl *findMethodInCurrentClass(Sema &S, Selector Sel) {
|
||||||
// whether Sel is potentially direct in this context.
|
// whether Sel is potentially direct in this context.
|
||||||
if (ObjCMethodDecl *MD = IFace->lookupMethod(Sel, /*isInstance=*/true))
|
if (ObjCMethodDecl *MD = IFace->lookupMethod(Sel, /*isInstance=*/true))
|
||||||
return MD;
|
return MD;
|
||||||
if (ObjCMethodDecl *MD = IFace->lookupPrivateMethod(Sel, /*isInstance=*/true))
|
if (ObjCMethodDecl *MD = IFace->lookupPrivateMethod(Sel, /*Instance=*/true))
|
||||||
return MD;
|
return MD;
|
||||||
if (ObjCMethodDecl *MD = IFace->lookupMethod(Sel, /*isInstance=*/false))
|
if (ObjCMethodDecl *MD = IFace->lookupMethod(Sel, /*isInstance=*/false))
|
||||||
return MD;
|
return MD;
|
||||||
if (ObjCMethodDecl *MD = IFace->lookupPrivateMethod(Sel, /*isInstance=*/false))
|
if (ObjCMethodDecl *MD = IFace->lookupPrivateMethod(Sel, /*Instance=*/false))
|
||||||
return MD;
|
return MD;
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
|
@ -13149,7 +13149,7 @@ StmtResult Sema::ActOnOpenMPUnrollDirective(ArrayRef<OMPClause *> Clauses,
|
||||||
if (FullClause) {
|
if (FullClause) {
|
||||||
if (!VerifyPositiveIntegerConstantInClause(
|
if (!VerifyPositiveIntegerConstantInClause(
|
||||||
LoopHelper.NumIterations, OMPC_full, /*StrictlyPositive=*/false,
|
LoopHelper.NumIterations, OMPC_full, /*StrictlyPositive=*/false,
|
||||||
/*SuppressExprDigs=*/true)
|
/*SuppressExprDiags=*/true)
|
||||||
.isUsable()) {
|
.isUsable()) {
|
||||||
Diag(AStmt->getBeginLoc(), diag::err_omp_unroll_full_variable_trip_count);
|
Diag(AStmt->getBeginLoc(), diag::err_omp_unroll_full_variable_trip_count);
|
||||||
Diag(FullClause->getBeginLoc(), diag::note_omp_directive_here)
|
Diag(FullClause->getBeginLoc(), diag::note_omp_directive_here)
|
||||||
|
|
|
@ -9416,12 +9416,12 @@ Sema::AddArgumentDependentLookupCandidates(DeclarationName Name,
|
||||||
AddOverloadCandidate(
|
AddOverloadCandidate(
|
||||||
FD, FoundDecl, Args, CandidateSet, /*SuppressUserConversions=*/false,
|
FD, FoundDecl, Args, CandidateSet, /*SuppressUserConversions=*/false,
|
||||||
PartialOverloading, /*AllowExplicit=*/true,
|
PartialOverloading, /*AllowExplicit=*/true,
|
||||||
/*AllowExplicitConversions=*/false, ADLCallKind::UsesADL);
|
/*AllowExplicitConversion=*/false, ADLCallKind::UsesADL);
|
||||||
if (CandidateSet.getRewriteInfo().shouldAddReversed(Context, FD)) {
|
if (CandidateSet.getRewriteInfo().shouldAddReversed(Context, FD)) {
|
||||||
AddOverloadCandidate(
|
AddOverloadCandidate(
|
||||||
FD, FoundDecl, {Args[1], Args[0]}, CandidateSet,
|
FD, FoundDecl, {Args[1], Args[0]}, CandidateSet,
|
||||||
/*SuppressUserConversions=*/false, PartialOverloading,
|
/*SuppressUserConversions=*/false, PartialOverloading,
|
||||||
/*AllowExplicit=*/true, /*AllowExplicitConversions=*/false,
|
/*AllowExplicit=*/true, /*AllowExplicitConversion=*/false,
|
||||||
ADLCallKind::UsesADL, None, OverloadCandidateParamOrder::Reversed);
|
ADLCallKind::UsesADL, None, OverloadCandidateParamOrder::Reversed);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -3672,7 +3672,7 @@ QualType Sema::CheckTemplateIdType(TemplateName Name,
|
||||||
SmallVector<TemplateArgument, 4> Converted;
|
SmallVector<TemplateArgument, 4> Converted;
|
||||||
if (CheckTemplateArgumentList(Template, TemplateLoc, TemplateArgs,
|
if (CheckTemplateArgumentList(Template, TemplateLoc, TemplateArgs,
|
||||||
false, Converted,
|
false, Converted,
|
||||||
/*UpdateArgsWithConversion=*/true))
|
/*UpdateArgsWithConversions=*/true))
|
||||||
return QualType();
|
return QualType();
|
||||||
|
|
||||||
QualType CanonType;
|
QualType CanonType;
|
||||||
|
@ -4318,7 +4318,7 @@ DeclResult Sema::ActOnVarTemplateSpecialization(
|
||||||
SmallVector<TemplateArgument, 4> Converted;
|
SmallVector<TemplateArgument, 4> Converted;
|
||||||
if (CheckTemplateArgumentList(VarTemplate, TemplateNameLoc, TemplateArgs,
|
if (CheckTemplateArgumentList(VarTemplate, TemplateNameLoc, TemplateArgs,
|
||||||
false, Converted,
|
false, Converted,
|
||||||
/*UpdateArgsWithConversion=*/true))
|
/*UpdateArgsWithConversions=*/true))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// Find the variable template (partial) specialization declaration that
|
// Find the variable template (partial) specialization declaration that
|
||||||
|
@ -4489,7 +4489,7 @@ Sema::CheckVarTemplateId(VarTemplateDecl *Template, SourceLocation TemplateLoc,
|
||||||
if (CheckTemplateArgumentList(
|
if (CheckTemplateArgumentList(
|
||||||
Template, TemplateNameLoc,
|
Template, TemplateNameLoc,
|
||||||
const_cast<TemplateArgumentListInfo &>(TemplateArgs), false,
|
const_cast<TemplateArgumentListInfo &>(TemplateArgs), false,
|
||||||
Converted, /*UpdateArgsWithConversion=*/true))
|
Converted, /*UpdateArgsWithConversions=*/true))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// Produce a placeholder value if the specialization is dependent.
|
// Produce a placeholder value if the specialization is dependent.
|
||||||
|
@ -4677,7 +4677,7 @@ Sema::CheckConceptTemplateId(const CXXScopeSpec &SS,
|
||||||
if (CheckTemplateArgumentList(NamedConcept, ConceptNameInfo.getLoc(),
|
if (CheckTemplateArgumentList(NamedConcept, ConceptNameInfo.getLoc(),
|
||||||
const_cast<TemplateArgumentListInfo&>(*TemplateArgs),
|
const_cast<TemplateArgumentListInfo&>(*TemplateArgs),
|
||||||
/*PartialTemplateArgs=*/false, Converted,
|
/*PartialTemplateArgs=*/false, Converted,
|
||||||
/*UpdateArgsWithConversion=*/false))
|
/*UpdateArgsWithConversions=*/false))
|
||||||
return ExprError();
|
return ExprError();
|
||||||
|
|
||||||
ConstraintSatisfaction Satisfaction;
|
ConstraintSatisfaction Satisfaction;
|
||||||
|
@ -8343,7 +8343,7 @@ DeclResult Sema::ActOnClassTemplateSpecialization(
|
||||||
SmallVector<TemplateArgument, 4> Converted;
|
SmallVector<TemplateArgument, 4> Converted;
|
||||||
if (CheckTemplateArgumentList(ClassTemplate, TemplateNameLoc,
|
if (CheckTemplateArgumentList(ClassTemplate, TemplateNameLoc,
|
||||||
TemplateArgs, false, Converted,
|
TemplateArgs, false, Converted,
|
||||||
/*UpdateArgsWithConversion=*/true))
|
/*UpdateArgsWithConversions=*/true))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// Find the class template (partial) specialization declaration that
|
// Find the class template (partial) specialization declaration that
|
||||||
|
@ -9595,7 +9595,7 @@ DeclResult Sema::ActOnExplicitInstantiation(
|
||||||
SmallVector<TemplateArgument, 4> Converted;
|
SmallVector<TemplateArgument, 4> Converted;
|
||||||
if (CheckTemplateArgumentList(ClassTemplate, TemplateNameLoc,
|
if (CheckTemplateArgumentList(ClassTemplate, TemplateNameLoc,
|
||||||
TemplateArgs, false, Converted,
|
TemplateArgs, false, Converted,
|
||||||
/*UpdateArgsWithConversion=*/true))
|
/*UpdateArgsWithConversions=*/true))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// Find the class template specialization declaration that
|
// Find the class template specialization declaration that
|
||||||
|
|
|
@ -5355,7 +5355,7 @@ static bool isAtLeastAsSpecializedAs(Sema &S, QualType T1, QualType T2,
|
||||||
bool AtLeastAsSpecialized;
|
bool AtLeastAsSpecialized;
|
||||||
S.runWithSufficientStackSpace(Info.getLocation(), [&] {
|
S.runWithSufficientStackSpace(Info.getLocation(), [&] {
|
||||||
AtLeastAsSpecialized = !FinishTemplateArgumentDeduction(
|
AtLeastAsSpecialized = !FinishTemplateArgumentDeduction(
|
||||||
S, P2, /*IsPartialOrdering=*/true,
|
S, P2, /*PartialOrdering=*/true,
|
||||||
TemplateArgumentList(TemplateArgumentList::OnStack,
|
TemplateArgumentList(TemplateArgumentList::OnStack,
|
||||||
TST1->template_arguments()),
|
TST1->template_arguments()),
|
||||||
Deduced, Info);
|
Deduced, Info);
|
||||||
|
|
|
@ -3637,7 +3637,7 @@ TemplateDeclInstantiator::VisitClassTemplateSpecializationDecl(
|
||||||
InstTemplateArgs,
|
InstTemplateArgs,
|
||||||
false,
|
false,
|
||||||
Converted,
|
Converted,
|
||||||
/*UpdateArgsWithConversion=*/true))
|
/*UpdateArgsWithConversions=*/true))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
// Figure out where to insert this class template explicit specialization
|
// Figure out where to insert this class template explicit specialization
|
||||||
|
@ -3759,7 +3759,7 @@ Decl *TemplateDeclInstantiator::VisitVarTemplateSpecializationDecl(
|
||||||
SmallVector<TemplateArgument, 4> Converted;
|
SmallVector<TemplateArgument, 4> Converted;
|
||||||
if (SemaRef.CheckTemplateArgumentList(InstVarTemplate, D->getLocation(),
|
if (SemaRef.CheckTemplateArgumentList(InstVarTemplate, D->getLocation(),
|
||||||
VarTemplateArgsInfo, false, Converted,
|
VarTemplateArgsInfo, false, Converted,
|
||||||
/*UpdateArgsWithConversion=*/true))
|
/*UpdateArgsWithConversions=*/true))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
// Check whether we've already seen a declaration of this specialization.
|
// Check whether we've already seen a declaration of this specialization.
|
||||||
|
|
|
@ -1643,7 +1643,7 @@ void MallocChecker::checkPostObjCMessage(const ObjCMethodCall &Call,
|
||||||
ProgramStateRef State =
|
ProgramStateRef State =
|
||||||
FreeMemAux(C, Call.getArgExpr(0), Call, C.getState(),
|
FreeMemAux(C, Call.getArgExpr(0), Call, C.getState(),
|
||||||
/*Hold=*/true, IsKnownToBeAllocatedMemory, AF_Malloc,
|
/*Hold=*/true, IsKnownToBeAllocatedMemory, AF_Malloc,
|
||||||
/*RetNullOnFailure=*/true);
|
/*ReturnsNullOnFailure=*/true);
|
||||||
|
|
||||||
C.addTransition(State);
|
C.addTransition(State);
|
||||||
}
|
}
|
||||||
|
|
|
@ -143,7 +143,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Opts->PrintStats || Opts->ShouldSerializeStats) {
|
if (Opts->PrintStats || Opts->ShouldSerializeStats) {
|
||||||
llvm::EnableStatistics(/* PrintOnExit= */ false);
|
llvm::EnableStatistics(/* DoPrintOnExit= */ false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Opts->ShouldDisplayMacroExpansions)
|
if (Opts->ShouldDisplayMacroExpansions)
|
||||||
|
|
|
@ -1306,7 +1306,7 @@ void Intrinsic::emitBodyAsBuiltinCall() {
|
||||||
if (LocalCK == ClassB) {
|
if (LocalCK == ClassB) {
|
||||||
Type T2 = T;
|
Type T2 = T;
|
||||||
T2.makeOneVector();
|
T2.makeOneVector();
|
||||||
T2.makeInteger(8, /*Signed=*/true);
|
T2.makeInteger(8, /*Sign=*/true);
|
||||||
Cast = "(" + T2.str() + ")";
|
Cast = "(" + T2.str() + ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue