<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Thanks! This should be enough for the tools, however I would also remove all other spaces inside the argument comments for consistency with the rest of LLVM code. Currently different ways of putting spaces inside the argument comments are used in LLVM as follows: </div><div class="gmail_quote"> 1. /*<space>Name<space>=<space>*/ - in 78 files (this is also misunderstood by clang-format)</div><div class="gmail_quote"> 2. /*<space>Name<space>=*/ - in 2 files</div><div class="gmail_quote"> 3. /*<space>Name=*/ - in 3 files</div><div class="gmail_quote"> 4. /*Name=*/ - in 693 files.</div><div class="gmail_quote"><br></div><div class="gmail_quote">So #4 is clearly the prevalent style.</div><div class="gmail_quote"><br></div><div class="gmail_quote">-- Alex</div><div class="gmail_quote"><br></div><div class="gmail_quote">On Tue, Oct 24, 2017 at 5:03 PM, George Karpenkov via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Author: george.karpenkov<br>
Date: Tue Oct 24 17:03:45 2017<br>
New Revision: 316539<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=316539&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=316539&view=rev</a><br>
Log:<br>
[Analyzer] Remove spaces inside comments mentioning the parameter name,<br>
<br>
to aid clang-tidy comprehension.<br>
Requested by @alexfh in <a href="https://reviews.llvm.org/D39015" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D39015</a><br>
<br>
Modified:<br>
cfe/trunk/lib/Analysis/<wbr>BodyFarm.cpp<br>
<br>
Modified: cfe/trunk/lib/Analysis/<wbr>BodyFarm.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/BodyFarm.cpp?rev=316539&r1=316538&r2=316539&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/lib/<wbr>Analysis/BodyFarm.cpp?rev=<wbr>316539&r1=316538&r2=316539&<wbr>view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- cfe/trunk/lib/Analysis/<wbr>BodyFarm.cpp (original)<br>
+++ cfe/trunk/lib/Analysis/<wbr>BodyFarm.cpp Tue Oct 24 17:03:45 2017<br>
@@ -168,10 +168,10 @@ ASTMaker::makeLvalueToRvalue(<wbr>const VarDe<br>
ImplicitCastExpr *ASTMaker::makeImplicitCast(<wbr>const Expr *Arg, QualType Ty,<br>
CastKind CK) {<br>
return ImplicitCastExpr::Create(C, Ty,<br>
- /* CastKind= */ CK,<br>
- /* Expr= */ const_cast<Expr *>(Arg),<br>
- /* CXXCastPath= */ nullptr,<br>
- /* ExprValueKind= */ VK_RValue);<br>
+ /* CastKind=*/ CK,<br>
+ /* Expr=*/ const_cast<Expr *>(Arg),<br>
+ /* CXXCastPath=*/ nullptr,<br>
+ /* ExprValueKind=*/ VK_RValue);<br>
}<br>
<br>
Expr *ASTMaker::makeIntegralCast(<wbr>const Expr *Arg, QualType Ty) {<br>
@@ -222,7 +222,7 @@ MemberExpr *ASTMaker::makeMemberExpressi<br>
C, base, IsArrow, SourceLocation(), NestedNameSpecifierLoc(),<br>
SourceLocation(), MemberDecl, FoundDecl,<br>
DeclarationNameInfo(<wbr>MemberDecl->getDeclName(), SourceLocation()),<br>
- /* TemplateArgumentListInfo= */ nullptr, MemberDecl->getType(), ValueKind,<br>
+ /* TemplateArgumentListInfo=*/ nullptr, MemberDecl->getType(), ValueKind,<br>
OK_Ordinary);<br>
}<br>
<br>
@@ -231,7 +231,7 @@ ValueDecl *ASTMaker::findMemberField(con<br>
CXXBasePaths Paths(<br>
/* FindAmbiguities=*/false,<br>
/* RecordPaths=*/false,<br>
- /* DetectVirtual= */ false);<br>
+ /* DetectVirtual=*/ false);<br>
const IdentifierInfo &II = C.Idents.get(Name);<br>
DeclarationName DeclName = C.DeclarationNames.<wbr>getIdentifier(&II);<br>
<br>
@@ -282,14 +282,14 @@ static CallExpr *create_call_once_lambda<br>
assert(callOperatorDecl != nullptr);<br>
<br>
DeclRefExpr *callOperatorDeclRef =<br>
- DeclRefExpr::Create(/* Ctx = */ C,<br>
- /* QualifierLoc = */ NestedNameSpecifierLoc(),<br>
- /* TemplateKWLoc = */ SourceLocation(),<br>
+ DeclRefExpr::Create(/* Ctx =*/ C,<br>
+ /* QualifierLoc =*/ NestedNameSpecifierLoc(),<br>
+ /* TemplateKWLoc =*/ SourceLocation(),<br>
const_cast<FunctionDecl *>(callOperatorDecl),<br>
- /* RefersToEnclosingVariableOrCap<wbr>ture= */ false,<br>
- /* NameLoc = */ SourceLocation(),<br>
- /* T = */ callOperatorDecl->getType(),<br>
- /* VK = */ VK_LValue);<br>
+ /* RefersToEnclosingVariableOrCap<wbr>ture=*/ false,<br>
+ /* NameLoc =*/ SourceLocation(),<br>
+ /* T =*/ callOperatorDecl->getType(),<br>
+ /* VK =*/ VK_LValue);<br>
<br>
return new (C)<br>
CXXOperatorCallExpr(/*<wbr>AstContext=*/C, OO_Call, callOperatorDeclRef,<br>
@@ -372,7 +372,7 @@ static Stmt *create_call_once(ASTContext<br>
// Lambda requires callback itself inserted as a first parameter.<br>
CallArgs.push_back(<br>
M.makeDeclRefExpr(Callback,<br>
- /* RefersToEnclosingVariableOrCap<wbr>ture= */ true));<br>
+ /* RefersToEnclosingVariableOrCap<wbr>ture=*/ true));<br>
CallbackFunctionType = CallbackRecordDecl-><wbr>getLambdaCallOperator()<br>
->getType()<br>
->getAs<FunctionProtoType>();<br>
@@ -429,13 +429,13 @@ static Stmt *create_call_once(ASTContext<br>
<br>
// Negation predicate.<br>
UnaryOperator *FlagCheck = new (C) UnaryOperator(<br>
- /* input= */<br>
+ /* input=*/<br>
M.makeImplicitCast(M.<wbr>makeLvalueToRvalue(Deref, DerefType), DerefType,<br>
CK_IntegralToBoolean),<br>
- /* opc= */ UO_LNot,<br>
- /* QualType= */ C.IntTy,<br>
- /* ExprValueKind= */ VK_RValue,<br>
- /* ExprObjectKind= */ OK_Ordinary, SourceLocation());<br>
+ /* opc=*/ UO_LNot,<br>
+ /* QualType=*/ C.IntTy,<br>
+ /* ExprValueKind=*/ VK_RValue,<br>
+ /* ExprObjectKind=*/ OK_Ordinary, SourceLocation());<br>
<br>
// Create assignment.<br>
BinaryOperator *FlagAssignment = M.makeAssignment(<br>
@@ -443,11 +443,11 @@ static Stmt *create_call_once(ASTContext<br>
<br>
IfStmt *Out = new (C)<br>
IfStmt(C, SourceLocation(),<br>
- /* IsConstexpr= */ false,<br>
- /* init= */ nullptr,<br>
- /* var= */ nullptr,<br>
- /* cond= */ FlagCheck,<br>
- /* then= */ M.makeCompound({CallbackCall, FlagAssignment}));<br>
+ /* IsConstexpr=*/ false,<br>
+ /* init=*/ nullptr,<br>
+ /* var=*/ nullptr,<br>
+ /* cond=*/ FlagCheck,<br>
+ /* then=*/ M.makeCompound({CallbackCall, FlagAssignment}));<br>
<br>
return Out;<br>
}<br>
@@ -522,19 +522,19 @@ static Stmt *create_dispatch_once(ASTCon<br>
PredicateTy);<br>
<br>
UnaryOperator *UO = new (C) UnaryOperator(<br>
- /* input= */ LValToRval,<br>
- /* opc= */ UO_LNot,<br>
- /* QualType= */ C.IntTy,<br>
- /* ExprValueKind= */ VK_RValue,<br>
- /* ExprObjectKind= */ OK_Ordinary, SourceLocation());<br>
+ /* input=*/ LValToRval,<br>
+ /* opc=*/ UO_LNot,<br>
+ /* QualType=*/ C.IntTy,<br>
+ /* ExprValueKind=*/ VK_RValue,<br>
+ /* ExprObjectKind=*/ OK_Ordinary, SourceLocation());<br>
<br>
// (5) Create the 'if' statement.<br>
IfStmt *If = new (C) IfStmt(C, SourceLocation(),<br>
- /* IsConstexpr= */ false,<br>
- /* init= */ nullptr,<br>
- /* var= */ nullptr,<br>
- /* cond= */ UO,<br>
- /* then= */ CS);<br>
+ /* IsConstexpr=*/ false,<br>
+ /* init=*/ nullptr,<br>
+ /* var=*/ nullptr,<br>
+ /* cond=*/ UO,<br>
+ /* then=*/ CS);<br>
return If;<br>
}<br>
<br>
<br>
<br>
______________________________<wbr>_________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div></div>