diff options
author | Ivan Donchevskii <ivan.donchevskii@qt.io> | 2018-01-03 10:04:37 +0000 |
---|---|---|
committer | Ivan Donchevskii <ivan.donchevskii@qt.io> | 2018-01-03 10:04:37 +0000 |
commit | a99154bb126185c6c924d23e43200e75d7a2b736 (patch) | |
tree | ef8645b3cc65ff62df9310b590ab6b36552d3de9 /lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value | |
parent | 0b2f162d71786ff3970fa7250f4bde508750af71 (diff) | |
download | bcm5719-llvm-a99154bb126185c6c924d23e43200e75d7a2b736.tar.gz bcm5719-llvm-a99154bb126185c6c924d23e43200e75d7a2b736.zip |
[libclang] Fix cursors for functions with trailing return type
For the function declaration
auto foo5(Foo) -> Foo;
the parameter tokens were mapped to cursors representing the
FunctionDecl:
Keyword: "auto" [1:1 - 1:5] FunctionDecl=test5:1:6
Identifier: "test5" [1:6 - 1:11] FunctionDecl=test5:1:6
Punctuation: "(" [1:11 - 1:12] FunctionDecl=test5:1:6
Identifier: "X" [1:12 - 1:13] FunctionDecl=test5:1:6 // Ops, not a TypeRef
Punctuation: ")" [1:13 - 1:14] FunctionDecl=test5:1:6
Punctuation: "->" [1:15 - 1:17] FunctionDecl=test5:1:6
Identifier: "X" [1:18 - 1:19] TypeRef=struct X:7:8
Punctuation: ";" [1:19 - 1:20]
Fix this by ensuring that the trailing return type is not visited as
first.
Patch by Nikolai Kosjar.
Differential Revision: https://reviews.llvm.org/D40561
llvm-svn: 321698
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value')
0 files changed, 0 insertions, 0 deletions