aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaCodeComplete.cpp
diff options
context:
space:
mode:
authorNathan Ridge <zeratul976@hotmail.com>2022-12-16 03:35:42 -0500
committerNathan Ridge <zeratul976@hotmail.com>2022-12-16 14:34:11 -0500
commit556d48fbaa994fc8b6993a90ec74fe6204ccc11c (patch)
tree073eeaf1556b8a20848943d39ac8c091c3ca7941 /clang/lib/Sema/SemaCodeComplete.cpp
parentdaa6305cf7ece2a85aa37e6a880ea64333360499 (diff)
downloadllvm-556d48fbaa994fc8b6993a90ec74fe6204ccc11c.zip
llvm-556d48fbaa994fc8b6993a90ec74fe6204ccc11c.tar.gz
llvm-556d48fbaa994fc8b6993a90ec74fe6204ccc11c.tar.bz2
[CodeComplete] Offer completions for headers with extension .hxx in include directives
Fixes https://github.com/clangd/clangd/issues/1379 Differential Revision: https://reviews.llvm.org/D140191
Diffstat (limited to 'clang/lib/Sema/SemaCodeComplete.cpp')
-rw-r--r--clang/lib/Sema/SemaCodeComplete.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaCodeComplete.cpp b/clang/lib/Sema/SemaCodeComplete.cpp
index 2cd679a..3148448 100644
--- a/clang/lib/Sema/SemaCodeComplete.cpp
+++ b/clang/lib/Sema/SemaCodeComplete.cpp
@@ -10030,10 +10030,10 @@ void Sema::CodeCompleteIncludedFile(llvm::StringRef Dir, bool Angled) {
break;
case llvm::sys::fs::file_type::regular_file: {
// Only files that really look like headers. (Except in special dirs).
- // Header extensions from Types.def, which we can't depend on here.
const bool IsHeader = Filename.endswith_insensitive(".h") ||
Filename.endswith_insensitive(".hh") ||
Filename.endswith_insensitive(".hpp") ||
+ Filename.endswith_insensitive(".hxx") ||
Filename.endswith_insensitive(".inc") ||
(ExtensionlessHeaders && !Filename.contains('.'));
if (!IsHeader)