<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - ProfileFoldOpInit vs FoldOpInit::get/FoldOpInit::Profile - argument order mismatch"
href="https://bugs.llvm.org/show_bug.cgi?id=50595">50595</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>ProfileFoldOpInit vs FoldOpInit::get/FoldOpInit::Profile - argument order mismatch
</td>
</tr>
<tr>
<th>Product</th>
<td>tools
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>TableGen
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>llvm-dev@redking.me.uk
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, nhaehnle@gmail.com, paul@windfall-software.com
</td>
</tr></table>
<p>
<div>
<pre>static void ProfileFoldOpInit(FoldingSetNodeID &ID, Init *A, Init *B,
Init *Start, Init *List, Init *Expr,
RecTy *Type) {
ID.AddPointer(Start);
ID.AddPointer(List);
ID.AddPointer(A);
ID.AddPointer(B);
ID.AddPointer(Expr);
ID.AddPointer(Type);
}
FoldOpInit *FoldOpInit::get(Init *Start, Init *List, Init *A, Init *B,
Init *Expr, RecTy *Type) {
static FoldingSet<FoldOpInit> ThePool;
FoldingSetNodeID ID;
ProfileFoldOpInit(ID, Start, List, A, B, Expr, Type);
void *IP = nullptr;
if (FoldOpInit *I = ThePool.FindNodeOrInsertPos(ID, IP))
return I;
FoldOpInit *I = new (Allocator) FoldOpInit(Start, List, A, B, Expr, Type);
ThePool.InsertNode(I, IP);
return I;
}
void FoldOpInit::Profile(FoldingSetNodeID &ID) const {
ProfileFoldOpInit(ID, Start, List, A, B, Expr, getType());
}
Reported by coverity - which doesn't like the fact that we call
ProfileFoldOpInit with args that have the same names as OTHER args....</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>