From dccbabfacf4b993e2cbe394c814c47b4dca17df8 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Wed, 17 Dec 2014 20:23:11 +0000 Subject: 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. llvm-svn: 224454 --- clang/test/Frontend/verify-unknown-arg.c | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 clang/test/Frontend/verify-unknown-arg.c (limited to 'clang/test/Frontend/verify-unknown-arg.c') diff --git a/clang/test/Frontend/verify-unknown-arg.c b/clang/test/Frontend/verify-unknown-arg.c new file mode 100644 index 00000000000..5767daedca3 --- /dev/null +++ b/clang/test/Frontend/verify-unknown-arg.c @@ -0,0 +1,6 @@ +// RUN: not %clang_cc1 -asdf -verify %s 2>&1 | FileCheck %s + +// expected-no-diagnostics + +// CHECK: error: 'error' diagnostics seen but not expected: +// CHECK-NEXT: (frontend): unknown argument: '-asdf' -- cgit v1.2.3