mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-21 12:35:47 -04:00

All attributes have a source range associated with it. However, implicit attributes are added by the compiler, and not added because the user wrote something in the input. So no token type should be set to CXCursor_*Attr. The problem was visible when a class gets marked by e.g. MSInheritanceAttr, which has the full CXXRecordDecl's range as its own range. The effect of marking that range as CXCursor_UnexposedAttr was that all cursors for the record decl, including all child decls, would become CXCursor_UnexposedAttr. llvm-svn: 330692
21 lines
419 B
C++
21 lines
419 B
C++
// RUN: c-index-test -test-annotate-tokens=%s:1:1:16:1 %s -target x86_64-pc-windows-msvc | FileCheck %s
|
|
class Foo
|
|
{
|
|
public:
|
|
void step(int v);
|
|
Foo();
|
|
};
|
|
|
|
void bar()
|
|
{
|
|
// Introduce a MSInheritanceAttr node on the CXXRecordDecl for Foo. The
|
|
// existance of this attribute should not mark all cursors for tokens in
|
|
// Foo as UnexposedAttr.
|
|
&Foo::step;
|
|
}
|
|
|
|
Foo::Foo()
|
|
{}
|
|
|
|
// CHECK-NOT: UnexposedAttr=
|