[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdevelop/assistantpopup-ng] languages/clang/duchain: Clang: Reduce matches for include file scanner
From: Kevin Funk <kfunk () kde ! org>
Date: 2016-06-30 23:50:46
Message-ID: E1bIljK-0005Ia-TM () code ! kde ! org
[Download RAW message or body]
Git commit bc74a0e878a9125a7a93f6bdb3ba2a28a5705264 by Kevin Funk.
Committed on 30/06/2016 at 23:30.
Pushed by kfunk into branch 'assistantpopup-ng'.
Clang: Reduce matches for include file scanner
For the include path scanner, only propose files (headers) which
either match $identifier or $identifier.*. Don't match all of $identifier* as before
M +2 -1 languages/clang/duchain/unknowndeclarationproblem.cpp
http://commits.kde.org/kdevelop/bc74a0e878a9125a7a93f6bdb3ba2a28a5705264
diff --git a/languages/clang/duchain/unknowndeclarationproblem.cpp \
b/languages/clang/duchain/unknowndeclarationproblem.cpp index 79486f3..02af3d7 100644
--- a/languages/clang/duchain/unknowndeclarationproblem.cpp
+++ b/languages/clang/duchain/unknowndeclarationproblem.cpp
@@ -91,7 +91,8 @@ QStringList scanIncludePaths( const QString& identifier, const \
QDir& dir, int ma return {};
}
- for (const auto& file : dir.entryList({identifier + QLatin1Char('*')}, \
QDir::Files)) { + const QStringList nameFilters = {identifier, identifier + \
QLatin1String(".*")}; + for (const auto& file : dir.entryList(nameFilters, \
QDir::Files)) {
if (identifier.compare(file, Qt::CaseInsensitive) == 0 || \
ClangHelpers::isHeader(file)) { const QString filePath = path + QLatin1Char('/') + \
file; clangDebug() << "Found candidate file" << filePath;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic