diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2016-11-02 23:42:33 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2016-11-02 23:42:33 +0000 |
commit | f12918d218b76ce442cd7e0c6b65620bf2d35805 (patch) | |
tree | 14626f62f0db0d6e7d8ddc767e14e21708113e58 /clang/test/Index/Core/index-source.cpp | |
parent | 80b64f0861e1e7370bca2ccc9b95a848b7e1e815 (diff) | |
download | bcm5719-llvm-f12918d218b76ce442cd7e0c6b65620bf2d35805.tar.gz bcm5719-llvm-f12918d218b76ce442cd7e0c6b65620bf2d35805.zip |
[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
Diffstat (limited to 'clang/test/Index/Core/index-source.cpp')
-rw-r--r-- | clang/test/Index/Core/index-source.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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); |