From c514adef056eec32cf6f748ba581b3d6e6814351 Mon Sep 17 00:00:00 2001 From: Ilya Biryukov Date: Thu, 24 Jan 2019 10:41:43 +0000 Subject: [CodeComplete] [clangd] Fix crash on ValueDecl with a null type Reviewers: kadircet Reviewed By: kadircet Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D57093 llvm-svn: 352040 --- clang/test/CodeCompletion/crash-null-type.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 clang/test/CodeCompletion/crash-null-type.cpp (limited to 'clang/test/CodeCompletion') diff --git a/clang/test/CodeCompletion/crash-null-type.cpp b/clang/test/CodeCompletion/crash-null-type.cpp new file mode 100644 index 00000000000..c5b3d1e7939 --- /dev/null +++ b/clang/test/CodeCompletion/crash-null-type.cpp @@ -0,0 +1,8 @@ +void test() { + for (auto [loopVar] : y) { // y has to be unresolved + loopVa + } +} +// RUN: not %clang_cc1 -fsyntax-only -code-completion-at=%s:3:11 %s -o - \ +// RUN: | FileCheck %s +// CHECK: COMPLETION: loopVar -- cgit v1.2.3