Public SmallVectorImpl constructor?

Hi all,

Just finished debugging a memory clobbering bug resulting from using SmallVectorImpl directly without realizing this is a bad idea (aside: I was using it directly because llvm::sys::path::append()’s first argument is a SmallVectorImpl). A note in the docs about not using SmallVectorImpl directly would be nice but could we go further and make SmallVectorImpl’s constructors not public? Is there a reason why they’re public right now?

I've had the same thought but never got around to trying to implement it. Does everything compile for you if it's protected? If so, then a patch would probably be happily accepted

Did that in r148550. It found a really dubious piece of code in clang but compiled fine otherwise.

- Ben