The CompilerInvocationBase class factors out members of CompilerInvocation that need special handling (initialization or copy constructor), so that CompilerInvocation can be implemented as a simple value object.
Currently, the AnalyzerOpts member of CompilerInvocation violates that setup. This patch extracts the member to CompilerInvocationBase and handles it in the copy constructor the same way other it handles other members.
I wonder if it would be better to signify this is a deep copy by naming the function, such as by calling it clone(). WDYT?