summaryrefslogtreecommitdiffstats
path: root/include/clang/Sema/Scope.h
diff options
context:
space:
mode:
authorErik Verbruggen <erikjv@me.com>2017-10-24 13:46:58 +0000
committerErik Verbruggen <erikjv@me.com>2017-10-24 13:46:58 +0000
commit47dbb7c0df89914d76d70960557124df96725c5d (patch)
tree820689d59176e57636343e444c273fd74d328e91 /include/clang/Sema/Scope.h
parent230376a3f6366a23eb9187be0d6b9a37ead024fe (diff)
Do not add a colon chunk to the code completion of class inheritance access modifiers
With enabled CINDEXTEST_CODE_COMPLETE_PATTERNS env option (which enables IncludeCodePatterns in completion options) code completion after colon currently suggests access modifiers with 2 completion chunks which is incorrect. Example: class A : <Cursor>B { } Currently we get 'NotImplemented:{TypedText public}{Colon :} (40)' but the correct line is just 'NotImplemented:{TypedText public} (40)' The fix introduces more specific scope that occurs between ':' and '{' It allows us to determine when we don't need to add ':' as a second chunk to the public/protected/private access modifiers. Patch by Ivan Donchevskii! Differential Revision: https://reviews.llvm.org/D38618 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316436 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Sema/Scope.h')
-rw-r--r--include/clang/Sema/Scope.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/clang/Sema/Scope.h b/include/clang/Sema/Scope.h
index e892d8205b..cd58a9910f 100644
--- a/include/clang/Sema/Scope.h
+++ b/include/clang/Sema/Scope.h
@@ -127,6 +127,9 @@ public:
/// This is a compound statement scope.
CompoundStmtScope = 0x400000,
+
+ /// We are between inheritance colon and the real class/struct definition scope.
+ ClassInheritanceScope = 0x800000,
};
private:
/// The parent scope for this scope. This is null for the translation-unit