summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorIlya Biryukov <ibiryukov@google.com>2018-03-09 14:43:29 +0000
committerIlya Biryukov <ibiryukov@google.com>2018-03-09 14:43:29 +0000
commit1a1dffd27585fc97c22acae9628c781060a7afc8 (patch)
treebd1946550b90c702d0ebc5a4dd5f6e1c39a373c0 /clang/test
parentef624fecdd2bf4c122afaaf32c84cb0c5a45de20 (diff)
downloadbcm5719-llvm-1a1dffd27585fc97c22acae9628c781060a7afc8.tar.gz
bcm5719-llvm-1a1dffd27585fc97c22acae9628c781060a7afc8.zip
[SemaOverload] Fixed crash on code completion
Summary: The relevant failing assertion message is: ../tools/clang/lib/Sema/SemaInit.cpp:8411: PerformCopyInitialization(): Assertion `InitE && "No initialization expression?"' failed. See the added test case for a repro. Reviewers: bkramer, sammccall, ioeric, hokein Reviewed By: sammccall Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D44300 llvm-svn: 327134
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/CodeCompletion/enable-if-attr-crash.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/CodeCompletion/enable-if-attr-crash.cpp b/clang/test/CodeCompletion/enable-if-attr-crash.cpp
new file mode 100644
index 00000000000..cca84b28ecf
--- /dev/null
+++ b/clang/test/CodeCompletion/enable-if-attr-crash.cpp
@@ -0,0 +1,8 @@
+int foo(bool x) __attribute__((enable_if(x, "")));
+
+int test() {
+ bool fffffff;
+ // RUN: %clang_cc1 -std=c++11 -code-completion-at=%s:7:8 %s | FileCheck %s
+ // CHECK: COMPLETION: fffffff : [#bool#]fffffff
+ foo(ff
+}
OpenPOWER on IntegriCloud