MCPcopy Create free account
hub / github.com/KDE/kdevelop / includeFiles

Function includeFiles

plugins/clang/duchain/unknowndeclarationproblem.cpp:389–404  ·  view source on GitHub ↗

* Return a list of header files viable for inclusions. All elements will be unique */

Source from the content-addressed store, hash-verified

387 * Return a list of header files viable for inclusions. All elements will be unique
388 */
389QStringList includeFiles(const QualifiedIdentifier& identifier, const QVector<Declaration*>& declarations, const KDevelop::Path& file)
390{
391 const auto includes = includePaths( file );
392 if( includes.isEmpty() ) {
393 clangDebug() << "Include path is empty";
394 return {};
395 }
396
397 const auto candidates = UnknownDeclarationProblem::findMatchingIncludeFiles(declarations);
398 if( !candidates.isEmpty() ) {
399 // If we find a candidate from the duchain we don't bother scanning the include paths
400 return candidates;
401 }
402
403 return scanIncludePaths(identifier, includes);
404}
405
406/**
407 * Construct viable forward declarations for the type name.

Callers 1

fixUnknownDeclarationFunction · 0.85

Calls 3

includePathsFunction · 0.85
scanIncludePathsFunction · 0.85
isEmptyMethod · 0.45

Tested by

no test coverage detected