summaryrefslogtreecommitdiffstats
path: root/development/qt-creator-llvm/patches/030_D38615_Only-mark-CXCursors-for-explicit-attributes-with-a-type.patch
diff options
context:
space:
mode:
Diffstat (limited to 'development/qt-creator-llvm/patches/030_D38615_Only-mark-CXCursors-for-explicit-attributes-with-a-type.patch')
-rw-r--r--development/qt-creator-llvm/patches/030_D38615_Only-mark-CXCursors-for-explicit-attributes-with-a-type.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/development/qt-creator-llvm/patches/030_D38615_Only-mark-CXCursors-for-explicit-attributes-with-a-type.patch b/development/qt-creator-llvm/patches/030_D38615_Only-mark-CXCursors-for-explicit-attributes-with-a-type.patch
new file mode 100644
index 0000000000..3357f874aa
--- /dev/null
+++ b/development/qt-creator-llvm/patches/030_D38615_Only-mark-CXCursors-for-explicit-attributes-with-a-type.patch
@@ -0,0 +1,34 @@
+--- /dev/null
++++ b/tools/clang/test/Index/annotate-tokens-unexposed.cpp
+@@ -0,0 +1,20 @@
++// 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
++ // existence of this attribute should not mark all cursors for tokens in
++ // Foo as UnexposedAttr.
++ &Foo::step;
++}
++
++Foo::Foo()
++{}
++
++// CHECK-NOT: UnexposedAttr=
+--- a/tools/clang/tools/libclang/CIndex.cpp
++++ b/tools/clang/tools/libclang/CIndex.cpp
+@@ -1772,7 +1772,7 @@
+
+ bool CursorVisitor::VisitAttributes(Decl *D) {
+ for (const auto *I : D->attrs())
+- if (Visit(MakeCXCursor(I, D, TU)))
++ if (!I->isImplicit() && Visit(MakeCXCursor(I, D, TU)))
+ return true;
+
+ return false;