summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cpppreprocessor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/cpptools/cpppreprocessor.cpp')
-rw-r--r--src/plugins/cpptools/cpppreprocessor.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/cpptools/cpppreprocessor.cpp b/src/plugins/cpptools/cpppreprocessor.cpp
index 1e3f5b1bf0..f60c853b83 100644
--- a/src/plugins/cpptools/cpppreprocessor.cpp
+++ b/src/plugins/cpptools/cpppreprocessor.cpp
@@ -223,10 +223,15 @@ QString CppPreprocessor::cleanPath(const QString &path)
return result;
}
+static inline bool isInjectedFile(const QString &fileName)
+{
+ return fileName.startsWith(QLatin1Char('<')) && fileName.endsWith(QLatin1Char('>'));
+}
+
QString CppPreprocessor::resolveFile_helper(const QString &fileName, IncludeType type)
{
const QFileInfo fileInfo(fileName);
- if (fileName == Preprocessor::configurationFileName || fileInfo.isAbsolute())
+ if (isInjectedFile(fileName) || fileInfo.isAbsolute())
return fileName;
if (type == IncludeLocal && m_currentDoc) {