[LLVMdev] Guidance on using pointers vs. references for function arguments

David Chisnall David.Chisnall at cl.cam.ac.uk
Wed May 28 11:20:08 PDT 2014


On 28 May 2014, at 15:46, Artyom Skrobov <Artyom.Skrobov at arm.com> wrote:

> I understand that for experienced contributors who work extensively on a
> part of LLVM, the "local conventions" can seem natural and unobtrusive; but
> for a newcomer, "getting a feel" for such ambiguous, implicit conventions is
> just a speed-bump in the way of contributing to the project.

For experienced contributors *who stay within one part of the code*, this may be true.  For those of us who work on clang, the back end, and anything in between, the cognitive load to work out at any particular level which are the types that are expected to be pointers and which are expected to be references is quite high, especially as there are a number of things that are in the usually-pointers category in some parts of the codebase and the usually-references category in others.  

David





More information about the llvm-dev mailing list