summaryrefslogtreecommitdiff
path: root/include/clang/Sema/CodeCompleteOptions.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Sema/CodeCompleteOptions.h')
-rw-r--r--include/clang/Sema/CodeCompleteOptions.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/include/clang/Sema/CodeCompleteOptions.h b/include/clang/Sema/CodeCompleteOptions.h
index fc7713c79571..091d8ca60505 100644
--- a/include/clang/Sema/CodeCompleteOptions.h
+++ b/include/clang/Sema/CodeCompleteOptions.h
@@ -24,15 +24,20 @@ public:
/// Show top-level decls in code completion results.
unsigned IncludeGlobals : 1;
+ /// Show decls in namespace (including the global namespace) in code
+ /// completion results. If this is 0, `IncludeGlobals` will be ignored.
+ ///
+ /// Currently, this only works when completing qualified IDs (i.e.
+ /// `Sema::CodeCompleteQualifiedId`).
+ /// FIXME: consider supporting more completion cases with this option.
+ unsigned IncludeNamespaceLevelDecls : 1;
+
/// Show brief documentation comments in code completion results.
unsigned IncludeBriefComments : 1;
- CodeCompleteOptions() :
- IncludeMacros(0),
- IncludeCodePatterns(0),
- IncludeGlobals(1),
- IncludeBriefComments(0)
- { }
+ CodeCompleteOptions()
+ : IncludeMacros(0), IncludeCodePatterns(0), IncludeGlobals(1),
+ IncludeNamespaceLevelDecls(1), IncludeBriefComments(0) {}
};
} // namespace clang