summaryrefslogtreecommitdiff
path: root/lib/Sema/SemaOverload.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2019-07-16 04:46:31 +0000
committerRui Ueyama <ruiu@google.com>2019-07-16 04:46:31 +0000
commitce7674d7be842d4863b410ce1dfd89416256e9c1 (patch)
tree8f7cd46a43fe75c980459888c73921270e6f7d86 /lib/Sema/SemaOverload.cpp
parent6f990ad598839825f0c11046a584b1dc90f4d740 (diff)
downloadclang-ce7674d7be842d4863b410ce1dfd89416256e9c1.tar.gz
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/cfe/trunk@366177 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaOverload.cpp')
-rw-r--r--lib/Sema/SemaOverload.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp
index 11595fac2c..77e6767c2b 100644
--- a/lib/Sema/SemaOverload.cpp
+++ b/lib/Sema/SemaOverload.cpp
@@ -1950,7 +1950,7 @@ IsTransparentUnionStandardConversion(Sema &S, Expr* From,
// It's compatible if the expression matches any of the fields.
for (const auto *it : UD->fields()) {
if (IsStandardConversion(S, From, it->getType(), InOverloadResolution, SCS,
- CStyle, /*ObjCWritebackConversion=*/false)) {
+ CStyle, /*AllowObjCWritebackConversion=*/false)) {
ToType = it->getType();
return true;
}
@@ -5423,7 +5423,7 @@ static ExprResult CheckConvertedConstantExpression(Sema &S, Expr *From,
: TryCopyInitialization(S, From, T,
/*SuppressUserConversions=*/false,
/*InOverloadResolution=*/false,
- /*AllowObjcWritebackConversion=*/false,
+ /*AllowObjCWritebackConversion=*/false,
/*AllowExplicit=*/false);
StandardConversionSequence *SCS = nullptr;
switch (ICS.getKind()) {
@@ -7319,7 +7319,7 @@ void Sema::AddMemberOperatorCandidates(OverloadedOperatorKind Op,
++Oper)
AddMethodCandidate(Oper.getPair(), Args[0]->getType(),
Args[0]->Classify(Context), Args.slice(1),
- CandidateSet, /*SuppressUserConversions=*/false);
+ CandidateSet, /*SuppressUserConversion=*/false);
}
}
@@ -8420,7 +8420,7 @@ public:
isEqualOp ? *Ptr : S.Context.getPointerDiffType(),
};
S.AddBuiltinCandidate(ParamTypes, Args, CandidateSet,
- /*IsAssigmentOperator=*/ isEqualOp);
+ /*IsAssignmentOperator=*/ isEqualOp);
bool NeedVolatile = !(*Ptr).isVolatileQualified() &&
VisibleTypeConversionsQuals.hasVolatile();
@@ -8429,7 +8429,7 @@ public:
ParamTypes[0] =
S.Context.getLValueReferenceType(S.Context.getVolatileType(*Ptr));
S.AddBuiltinCandidate(ParamTypes, Args, CandidateSet,
- /*IsAssigmentOperator=*/isEqualOp);
+ /*IsAssignmentOperator=*/isEqualOp);
}
if (!(*Ptr).isRestrictQualified() &&
@@ -8438,7 +8438,7 @@ public:
ParamTypes[0]
= S.Context.getLValueReferenceType(S.Context.getRestrictType(*Ptr));
S.AddBuiltinCandidate(ParamTypes, Args, CandidateSet,
- /*IsAssigmentOperator=*/isEqualOp);
+ /*IsAssignmentOperator=*/isEqualOp);
if (NeedVolatile) {
// volatile restrict version
@@ -8448,7 +8448,7 @@ public:
(Qualifiers::Volatile |
Qualifiers::Restrict)));
S.AddBuiltinCandidate(ParamTypes, Args, CandidateSet,
- /*IsAssigmentOperator=*/isEqualOp);
+ /*IsAssignmentOperator=*/isEqualOp);
}
}
}
@@ -8469,7 +8469,7 @@ public:
// non-volatile version
S.AddBuiltinCandidate(ParamTypes, Args, CandidateSet,
- /*IsAssigmentOperator=*/true);
+ /*IsAssignmentOperator=*/true);
bool NeedVolatile = !(*Ptr).isVolatileQualified() &&
VisibleTypeConversionsQuals.hasVolatile();
@@ -8478,7 +8478,7 @@ public:
ParamTypes[0] =
S.Context.getLValueReferenceType(S.Context.getVolatileType(*Ptr));
S.AddBuiltinCandidate(ParamTypes, Args, CandidateSet,
- /*IsAssigmentOperator=*/true);
+ /*IsAssignmentOperator=*/true);
}
if (!(*Ptr).isRestrictQualified() &&
@@ -8487,7 +8487,7 @@ public:
ParamTypes[0]
= S.Context.getLValueReferenceType(S.Context.getRestrictType(*Ptr));
S.AddBuiltinCandidate(ParamTypes, Args, CandidateSet,
- /*IsAssigmentOperator=*/true);
+ /*IsAssignmentOperator=*/true);
if (NeedVolatile) {
// volatile restrict version
@@ -8497,7 +8497,7 @@ public:
(Qualifiers::Volatile |
Qualifiers::Restrict)));
S.AddBuiltinCandidate(ParamTypes, Args, CandidateSet,
- /*IsAssigmentOperator=*/true);
+ /*IsAssignmentOperator=*/true);
}
}
}
@@ -8530,14 +8530,14 @@ public:
// Add this built-in operator as a candidate (VQ is empty).
ParamTypes[0] = S.Context.getLValueReferenceType(LeftBaseTy);
S.AddBuiltinCandidate(ParamTypes, Args, CandidateSet,
- /*IsAssigmentOperator=*/isEqualOp);
+ /*IsAssignmentOperator=*/isEqualOp);
// Add this built-in operator as a candidate (VQ is 'volatile').
if (VisibleTypeConversionsQuals.hasVolatile()) {
ParamTypes[0] = S.Context.getVolatileType(LeftBaseTy);
ParamTypes[0] = S.Context.getLValueReferenceType(ParamTypes[0]);
S.AddBuiltinCandidate(ParamTypes, Args, CandidateSet,
- /*IsAssigmentOperator=*/isEqualOp);
+ /*IsAssignmentOperator=*/isEqualOp);
}
}
}
@@ -8556,14 +8556,14 @@ public:
// Add this built-in operator as a candidate (VQ is empty).
ParamTypes[0] = S.Context.getLValueReferenceType(*Vec1);
S.AddBuiltinCandidate(ParamTypes, Args, CandidateSet,
- /*IsAssigmentOperator=*/isEqualOp);
+ /*IsAssignmentOperator=*/isEqualOp);
// Add this built-in operator as a candidate (VQ is 'volatile').
if (VisibleTypeConversionsQuals.hasVolatile()) {
ParamTypes[0] = S.Context.getVolatileType(*Vec1);
ParamTypes[0] = S.Context.getLValueReferenceType(ParamTypes[0]);
S.AddBuiltinCandidate(ParamTypes, Args, CandidateSet,
- /*IsAssigmentOperator=*/isEqualOp);
+ /*IsAssignmentOperator=*/isEqualOp);
}
}
}
@@ -9012,7 +9012,7 @@ Sema::AddArgumentDependentLookupCandidates(DeclarationName Name,
continue;
AddOverloadCandidate(FD, FoundDecl, Args, CandidateSet,
- /*SupressUserConversions=*/false, PartialOverloading,
+ /*SuppressUserConversions=*/false, PartialOverloading,
/*AllowExplicit*/ true,
/*AllowExplicitConversions*/ false,
ADLCallKind::UsesADL);
@@ -11763,7 +11763,7 @@ static void AddOverloadedCallCandidate(Sema &S,
return;
S.AddOverloadCandidate(Func, FoundDecl, Args, CandidateSet,
- /*SuppressUsedConversions=*/false,
+ /*SuppressUserConversions=*/false,
PartialOverloading);
return;
}
@@ -11772,7 +11772,7 @@ static void AddOverloadedCallCandidate(Sema &S,
= dyn_cast<FunctionTemplateDecl>(Callee)) {
S.AddTemplateOverloadCandidate(FuncTemplate, FoundDecl,
ExplicitTemplateArgs, Args, CandidateSet,
- /*SuppressUsedConversions=*/false,
+ /*SuppressUserConversions=*/false,
PartialOverloading);
return;
}
@@ -13066,7 +13066,7 @@ Sema::BuildCallToMemberFunction(Scope *S, Expr *MemExprE,
AddMethodTemplateCandidate(
cast<FunctionTemplateDecl>(Func), I.getPair(), ActingDC,
TemplateArgs, ObjectType, ObjectClassification, Args, CandidateSet,
- /*SuppressUsedConversions=*/false);
+ /*SuppressUserConversions=*/false);
}
}
@@ -13262,7 +13262,7 @@ Sema::BuildCallToObjectOfClassType(Scope *S, Expr *Obj,
Oper != OperEnd; ++Oper) {
AddMethodCandidate(Oper.getPair(), Object.get()->getType(),
Object.get()->Classify(Context), Args, CandidateSet,
- /*SuppressUserConversions=*/false);
+ /*SuppressUserConversion=*/false);
}
// C++ [over.call.object]p2:
@@ -13537,7 +13537,7 @@ Sema::BuildOverloadedArrowExpr(Scope *S, Expr *Base, SourceLocation OpLoc,
for (LookupResult::iterator Oper = R.begin(), OperEnd = R.end();
Oper != OperEnd; ++Oper) {
AddMethodCandidate(Oper.getPair(), Base->getType(), Base->Classify(Context),
- None, CandidateSet, /*SuppressUserConversions=*/false);
+ None, CandidateSet, /*SuppressUserConversion=*/false);
}
bool HadMultipleCandidates = (CandidateSet.size() > 1);
@@ -13919,7 +13919,7 @@ Expr *Sema::FixOverloadedFunctionReference(Expr *E, DeclAccessPair Found,
if (MemExpr->getQualifier())
Loc = MemExpr->getQualifierLoc().getBeginLoc();
Base =
- BuildCXXThisExpr(Loc, MemExpr->getBaseType(), /*isImplicit=*/true);
+ BuildCXXThisExpr(Loc, MemExpr->getBaseType(), /*IsImplicit=*/true);
}
} else
Base = MemExpr->getBase();