]> granicus.if.org Git - clang/commit
[index] Don't add relation to a NamedDecl with no name
authorBen Langmuir <blangmuir@apple.com>
Wed, 12 Jul 2017 22:05:30 +0000 (22:05 +0000)
committerBen Langmuir <blangmuir@apple.com>
Wed, 12 Jul 2017 22:05:30 +0000 (22:05 +0000)
commit2d77c354f16dda7be663553232555b0d61eab112
treea33bc816d5f76652a5350f16e129dbc6764157f1
parentf3ab09d9a0924b533b587e03b665fe6b4204b4ad
[index] Don't add relation to a NamedDecl with no name

Unless it's one of the special cases (tag, category) that we can handle.
This syncs up the check between handling a decl and handling a relation.

This would cause invalid nameless decls to end up in relations despite
having no name or USR.

rdar://problem/32474406

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307855 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Index/IndexingContext.cpp
test/Index/Core/index-source-invalid-name.cpp [new file with mode: 0644]