Overload SourceManager::overrideFileContents so that unconditionally passing ownership is explicitly done using unique_ptr.

Only those callers who are dynamically passing ownership should need the
3 argument form. Those accepting the default ("do pass ownership")
should do so explicitly with a unique_ptr now.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@216614 91177308-0d34-0410-b5e6-96231b3b80d8
Allow adding dll attributes on certain redecls with a warning if the decl hasn't been used yet (PR20746)

This shouldn't really be allowed, but it comes up in real code (see PR). As
long as the decl hasn't been used there's no technical difficulty in supporting
it, so downgrade the error to a warning.

Differential Revision: http://reviews.llvm.org/D5087

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@216619 91177308-0d34-0410-b5e6-96231b3b80d8
Query CompilationDatabase right before running each compilation.

Summary:
Query CompilationDatabase right before running each compilation. This allows
supporting compilation databases that change external state required for
successful compilation.

Reviewers: klimek, djasper

Reviewed By: djasper

Subscribers: klimek, cfe-commits

Differential Revision: http://reviews.llvm.org/D5086

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@216620 91177308-0d34-0410-b5e6-96231b3b80d8