Commit 9413a66
authored
Fix potential constructor ambiguity in BuiltinCallMutator::ValueTypePair (#3268)
BuiltinCallMutator::ValueTypePair defines its own constructor with
arguments (llvm::Value *V, llvm::Type *T)
BuiltinCallMutator::ValueTypePair also uses std::pair constructor with
arguments (llvm::Value *&V, llvm::Type *&T)
This causes an ambiguity that confuses GCC when compiling for C++20.
Issue repro on goldbolt: https://godbolt.org/z/MTnvx6E6T
There are multiple possible fixes. I think the one with the least impact
is to change BuiltinCallMutator::ValueTypePair constructor signature to
conform with std::pair constructor signature.
Fixed version: https://godbolt.org/z/49WzvjK63
Other possibility is to remove the constructors that are redundant. But
maybe they are very important.1 parent aaa2378 commit 9413a66
1 file changed
+0
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
143 | 142 | | |
144 | 143 | | |
145 | 144 | | |
| |||
0 commit comments