Displaying 2 results from an estimated 2 matches for "intrinsicinstr".
Did you mean:
intrinsicinst
2016 Dec 29
5
Modernizing LLVM Coding Style Guide and enforcing Clang-tidy
...ld like to start discussion about one of them, then please also
mention that you agree/disagree with the others.
One of the things that I would like to propose, is using push_back whenever
the inserted type is the same or it implicitly casts itself.
std::vector<Value*> v;
Instr *I;
Value *V;
IntrinsicInstr *II;
v.push_back(I);
v.push_back(V);
v.push_back(II);
Use emplace_back only if we insert temporary object like:
std::vector<SomeType> v2;
v2.emplace_back(a, b, c); // instead of v.push_back(SomeType(a, b, c));
The first reason is make code simple and more readable. I belive that code
'...
2016 Dec 29
0
[cfe-dev] Modernizing LLVM Coding Style Guide and enforcing Clang-tidy
...f them, then please also
> mention that you agree/disagree with the others.
> One of the things that I would like to propose, is using push_back
> whenever the inserted type is the same or it implicitly casts itself.
>
> std::vector<Value*> v;
> Instr *I;
> Value *V;
> IntrinsicInstr *II;
> v.push_back(I);
> v.push_back(V);
> v.push_back(II);
>
> Use emplace_back only if we insert temporary object like:
>
> std::vector<SomeType> v2;
> v2.emplace_back(a, b, c); // instead of v.push_back(SomeType(a, b, c));
>
> The first reason is make code sim...