Differential D12331 Diff 33201 plugins/custom-definesandincludes/compilerprovider/gcclikecompiler.cpp
Changeset View
Changeset View
Standalone View
Standalone View
plugins/custom-definesandincludes/compilerprovider/gcclikecompiler.cpp
Show First 20 Lines • Show All 184 Lines • ▼ Show 20 Line(s) | 174 | switch ( mode ) { | |||
---|---|---|---|---|---|
185 | case Includes: | 185 | case Includes: | ||
186 | //Detect the include-paths by the first space that is prepended. Reason: The list may contain relative paths like "." | 186 | //Detect the include-paths by the first space that is prepended. Reason: The list may contain relative paths like "." | ||
187 | if ( !line.startsWith( ' ' ) ) { | 187 | if ( !line.startsWith( ' ' ) ) { | ||
188 | // We've reached the end of the list. | 188 | // We've reached the end of the list. | ||
189 | mode = Finished; | 189 | mode = Finished; | ||
190 | } else { | 190 | } else { | ||
191 | // This is an include path, add it to the list. | 191 | // This is an include path, add it to the list. | ||
192 | auto hostPath = rt->pathInHost(Path(line.trimmed().toString())); | 192 | auto hostPath = rt->pathInHost(Path(line.trimmed().toString())); | ||
193 | // but skip folders with compiler builtins, we cannot parse these with clang | ||||
194 | if (!QFile::exists(hostPath.toLocalFile() + QLatin1String("/varargs.h"))) { | ||||
193 | data.includePaths << Path(QFileInfo(hostPath.toLocalFile()).canonicalFilePath()); | 195 | data.includePaths << Path(QFileInfo(hostPath.toLocalFile()).canonicalFilePath()); | ||
194 | } | 196 | } | ||
197 | } | ||||
195 | break; | 198 | break; | ||
196 | default: | 199 | default: | ||
197 | break; | 200 | break; | ||
198 | } | 201 | } | ||
199 | if ( mode == Finished ) { | 202 | if ( mode == Finished ) { | ||
200 | break; | 203 | break; | ||
201 | } | 204 | } | ||
202 | } | 205 | } | ||
Show All 14 Lines |