]> granicus.if.org Git - clang/commit
Destroy the diagnostic client first in ~DiagnosticEngine
authorReid Kleckner <reid@kleckner.net>
Wed, 17 Dec 2014 20:23:11 +0000 (20:23 +0000)
committerReid Kleckner <reid@kleckner.net>
Wed, 17 Dec 2014 20:23:11 +0000 (20:23 +0000)
commitf9fe7e8295aae20b2d96070eebb415321227a6d0
tree45c3d5ef0e2ccc9fb6e66594f273d409d2205d35
parentcc27a4a47212d4f78dd6bdfbb80ed4649af3d94c
Destroy the diagnostic client first in ~DiagnosticEngine

Add a comment and a test to ~DiagnosticEngine about the ordering
requirements on the teardown of DiagnosticConsumer. This could also be
accomplished by rearranging the fields of ~DiagnosticEngine, but I felt
that this was a better, more explicit solution.

This fixes PR21911, an issue that occurred after the unique_ptr
migration in r222193.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224454 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/Diagnostic.h
lib/Basic/Diagnostic.cpp
test/Frontend/verify-unknown-arg.c [new file with mode: 0644]