llvm-project/clang/test/CodeCompletion/enable-if-attr-crash.cpp
Ilya Biryukov 1a1dffd275 [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
2018-03-09 14:43:29 +00:00

9 lines
219 B
C++

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
}