summaryrefslogtreecommitdiffstats
path: root/clang/test/Frontend/diagnostics-order.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Frontend/diagnostics-order.c')
-rw-r--r--clang/test/Frontend/diagnostics-order.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/Frontend/diagnostics-order.c b/clang/test/Frontend/diagnostics-order.c
new file mode 100644
index 00000000000..e557fc631de
--- /dev/null
+++ b/clang/test/Frontend/diagnostics-order.c
@@ -0,0 +1,10 @@
+// Make sure a note stays with its associated command-line argument diagnostic.
+// Previously, these diagnostics were grouped by diagnostic level with all
+// notes last.
+//
+// RUN: not %clang_cc1 -O999 -std=bogus %s 2> %t
+// RUN: FileCheck < %t %s
+//
+// CHECK: warning: optimization level '-O999' is not supported
+// CHECK-NEXT: error: invalid value 'bogus' in '-std=bogus'
+// CHECK-NEXT: note: use {{.*}} for {{.*}} standard
OpenPOWER on IntegriCloud