From f12918d218b76ce442cd7e0c6b65620bf2d35805 Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Wed, 2 Nov 2016 23:42:33 +0000 Subject: [index] Fix assertion hit when handling a declaration of C++'s 'operator new' function. Part of this is to allow creating a USR for the canonical decl of that which is implicit and does not have a source location. rdar://28978992 llvm-svn: 285868 --- clang/test/Index/Core/index-source.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'clang/test/Index/Core/index-source.cpp') diff --git a/clang/test/Index/Core/index-source.cpp b/clang/test/Index/Core/index-source.cpp index c4e12903f6c..11ac89529dd 100644 --- a/clang/test/Index/Core/index-source.cpp +++ b/clang/test/Index/Core/index-source.cpp @@ -19,3 +19,9 @@ class BT { return { .idx = 0 }; // Make sure this doesn't trigger a crash. } }; + +// CHECK: [[@LINE+1]]:23 | type-alias/C | size_t | +typedef unsigned long size_t; +// CHECK: [[@LINE+2]]:7 | function/C | operator new | c:@F@operator new#l# | __Znwm | +// CHECK: [[@LINE+1]]:20 | type-alias/C | size_t | {{.*}} | Ref | +void* operator new(size_t sz); -- cgit v1.2.3