]> granicus.if.org Git - clang/commit
Avoid binding a reference to a dereferenced pointer in diagnostic serialization
authorRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 21 Aug 2012 03:11:53 +0000 (03:11 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 21 Aug 2012 03:11:53 +0000 (03:11 +0000)
commitdb309ae1bfa7c30ed3b2b9e59a316b8fef2e56b6
treef80346a7a9572cbd01c20ecf9dbb19e8fe37f9d6
parent0a7dd788dbef975f35f273c7ab913f480f7edd60
Avoid binding a reference to a dereferenced pointer in diagnostic serialization
if a diagnostic is emitted outside of any source file. The fix mirrors the
corresponding code in TextDiagnosticPrinter. This required moving the
functional parts of SDiagRenderer into SDiagWriter so they can be reused in the
non-rendering codepath.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162253 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Frontend/SerializedDiagnosticPrinter.cpp