summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeCompletion
diff options
context:
space:
mode:
authorIlya Biryukov <ibiryukov@google.com>2019-01-24 10:41:43 +0000
committerIlya Biryukov <ibiryukov@google.com>2019-01-24 10:41:43 +0000
commitc514adef056eec32cf6f748ba581b3d6e6814351 (patch)
treed51230ec317f217f0831b11b06c93a6586f89c68 /clang/test/CodeCompletion
parentfa2e927c44ea38f16aaf0a8db515acbb41152d02 (diff)
downloadbcm5719-llvm-c514adef056eec32cf6f748ba581b3d6e6814351.tar.gz
bcm5719-llvm-c514adef056eec32cf6f748ba581b3d6e6814351.zip
[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
Diffstat (limited to 'clang/test/CodeCompletion')
-rw-r--r--clang/test/CodeCompletion/crash-null-type.cpp8
1 files changed, 8 insertions, 0 deletions
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
OpenPOWER on IntegriCloud