llvm-project/clang/test/Index/read-empty-diags.test
Alex Lorenz 5ff6b8655a [Frontend] Verify that the bitstream is not empty before reading
the serialised diagnostics

Clang should avoid calling report_fatal_error when the file with the serialised
diagnostics is empty. This commit changes Clang's serialised diagnostic reader,
now it reports an appropriate error instead of crashing.

rdar://31939877

Differential Revision: https://reviews.llvm.org/D35069

llvm-svn: 307384
2017-07-07 10:25:12 +00:00

3 lines
166 B
Plaintext

// RUN: not c-index-test -read-diagnostics %S/Inputs/empty.dia 2>&1 | FileCheck %s
// CHECK: Trouble deserializing file (Invalid File): Invalid diagnostics signature