Skip to content

Commit dabc84c

Browse files
authored
[clang-tools-extra] Add include mappings for getopt.h (#140726)
1 parent c46a394 commit dabc84c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

clang-tools-extra/clang-include-fixer/find-all-symbols/STLPostfixHeaderMap.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,9 @@ const HeaderMapCollector::RegexHeaderMap *getSTLPostfixHeaderMap() {
606606
{"sys/xattr.h$", "<sys/xattr.h>"},
607607
{"bits/epoll.h$", "<sys/epoll.h>"},
608608
{"bits/eventfd.h$", "<sys/eventfd.h>"},
609+
{"bits/getopt_core.h$", "<getopt.h>"},
610+
{"bits/getopt_ext.h$", "<getopt.h>"},
611+
{"bits/getopt_posix.h$", "<getopt.h>"},
609612
{"bits/inotify.h$", "<sys/inotify.h>"},
610613
{"bits/ipc.h$", "<sys/ipc.h>"},
611614
{"bits/ipctypes.h$", "<sys/ipc.h>"},

clang-tools-extra/clangd/index/CanonicalIncludes.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,9 @@ const std::pair<llvm::StringRef, llvm::StringRef> IncludeMappings[] = {
621621
{"sys/xattr.h", "<sys/xattr.h>"},
622622
{"bits/epoll.h", "<sys/epoll.h>"},
623623
{"bits/eventfd.h", "<sys/eventfd.h>"},
624+
{"bits/getopt_core.h", "<getopt.h>"},
625+
{"bits/getopt_ext.h", "<getopt.h>"},
626+
{"bits/getopt_posix.h", "<getopt.h>"},
624627
{"bits/inotify.h", "<sys/inotify.h>"},
625628
{"bits/ipc.h", "<sys/ipc.h>"},
626629
{"bits/ipctypes.h", "<sys/ipc.h>"},

0 commit comments

Comments
 (0)