forked from OSchip/llvm-project
Fix up clangd after clang commit llvmorg-11-init-13375-g0a088ead85f.
It's not clear whether clangd should really consider #import to mark a header as self-contained or not, but this change preserves the old (and unit-tested) behavior.
This commit is contained in:
parent
52a6d47ada
commit
c35f3f8679
|
@ -743,7 +743,11 @@ bool SymbolCollector::isSelfContainedHeader(FileID FID) {
|
|||
const FileEntry *FE = SM.getFileEntryForID(FID);
|
||||
if (!FE)
|
||||
return false;
|
||||
if (!PP->getHeaderSearchInfo().isFileMultipleIncludeGuarded(FE))
|
||||
// FIXME: Should files that have been #import'd be considered
|
||||
// self-contained? That's really a property of the includer,
|
||||
// not of the file.
|
||||
if (!PP->getHeaderSearchInfo().isFileMultipleIncludeGuarded(FE) &&
|
||||
!PP->getHeaderSearchInfo().hasFileBeenImported(FE))
|
||||
return false;
|
||||
// This pattern indicates that a header can't be used without
|
||||
// particular preprocessor state, usually set up by another header.
|
||||
|
|
Loading…
Reference in New Issue