diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2016-08-03 05:38:53 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2016-08-03 05:38:53 +0000 |
commit | f60c395e84781f4842c416b3aede32be6d90eed7 (patch) | |
tree | 3bf10dcdab9b0dac34693ddecd99b0c3034bf924 /clang/test/Index/Core/index-source.cpp | |
parent | 2219d157481d0b253f00c5dd10b154a1b2743431 (diff) | |
download | bcm5719-llvm-f60c395e84781f4842c416b3aede32be6d90eed7.tar.gz bcm5719-llvm-f60c395e84781f4842c416b3aede32be6d90eed7.zip |
[index] Fix crash with indexing designated init expressions inside templates.
rdar://27452869
llvm-svn: 277570
Diffstat (limited to 'clang/test/Index/Core/index-source.cpp')
-rw-r--r-- | clang/test/Index/Core/index-source.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/Index/Core/index-source.cpp b/clang/test/Index/Core/index-source.cpp index 75c6396da55..c4e12903f6c 100644 --- a/clang/test/Index/Core/index-source.cpp +++ b/clang/test/Index/Core/index-source.cpp @@ -7,3 +7,15 @@ class TemplCls { // CHECK: [[@LINE-1]]:3 | constructor/C++ | TemplCls | c:@ST>1#T@TemplCls@F@TemplCls#I# | <no-cgname> | Decl,RelChild | rel: 1 // CHECK-NEXT: RelChild | TemplCls | c:@ST>1#T@TemplCls }; + +template <typename T> +class BT { + struct KLR { + int idx; + }; + + // CHECK: [[@LINE+1]]:7 | instance-method/C++ | foo | + KLR foo() { + return { .idx = 0 }; // Make sure this doesn't trigger a crash. + } +}; |