Changeset View
Changeset View
Standalone View
Standalone View
languages/clang/duchain/parsesession.cpp
Show All 16 Lines | 1 | /* | |||
---|---|---|---|---|---|
17 | 17 | | |||
18 | You should have received a copy of the GNU Library General Public License | 18 | You should have received a copy of the GNU Library General Public License | ||
19 | along with this library; see the file COPYING.LIB. If not, write to | 19 | along with this library; see the file COPYING.LIB. If not, write to | ||
20 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 20 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
21 | Boston, MA 02110-1301, USA. | 21 | Boston, MA 02110-1301, USA. | ||
22 | */ | 22 | */ | ||
23 | 23 | | |||
24 | #include "parsesession.h" | 24 | #include "parsesession.h" | ||
25 | #include <clangdebugwidget.h> | ||||
25 | #include <QStandardPaths> | 26 | #include <QStandardPaths> | ||
26 | #include "clangproblem.h" | 27 | #include "clangproblem.h" | ||
27 | #include "clangdiagnosticevaluator.h" | 28 | #include "clangdiagnosticevaluator.h" | ||
28 | #include "todoextractor.h" | 29 | #include "todoextractor.h" | ||
29 | #include "clanghelpers.h" | 30 | #include "clanghelpers.h" | ||
30 | #include "clangindex.h" | 31 | #include "clangindex.h" | ||
31 | #include "clangparsingenvironment.h" | 32 | #include "clangparsingenvironment.h" | ||
32 | #include "util/clangdebug.h" | 33 | #include "util/clangdebug.h" | ||
▲ Show 20 Lines • Show All 206 Lines • ▼ Show 20 Line(s) | 158 | #endif | |||
239 | if (qEnvironmentVariableIsSet("KDEV_CLANG_DISPLAY_ARGS")) { | 240 | if (qEnvironmentVariableIsSet("KDEV_CLANG_DISPLAY_ARGS")) { | ||
240 | QTextStream out(stdout); | 241 | QTextStream out(stdout); | ||
241 | out << "Invocation: clang"; | 242 | out << "Invocation: clang"; | ||
242 | foreach (const auto& arg, clangArguments) { | 243 | foreach (const auto& arg, clangArguments) { | ||
243 | out << " " << arg; | 244 | out << " " << arg; | ||
244 | } | 245 | } | ||
245 | out << " " << tuUrl.byteArray().constData() << "\n"; | 246 | out << " " << tuUrl.byteArray().constData() << "\n"; | ||
246 | } | 247 | } | ||
248 | ClangDebugWidget::sendDebug(tuUrl.toUrl(), clangArguments << tuUrl.c_str()); | ||||
247 | 249 | | |||
248 | const CXErrorCode code = clang_parseTranslationUnit2( | 250 | const CXErrorCode code = clang_parseTranslationUnit2( | ||
249 | index->index(), tuUrl.byteArray().constData(), | 251 | index->index(), tuUrl.byteArray().constData(), | ||
250 | clangArguments.constData(), clangArguments.size(), | 252 | clangArguments.constData(), clangArguments.size(), | ||
251 | unsaved.data(), unsaved.size(), | 253 | unsaved.data(), unsaved.size(), | ||
252 | flags, | 254 | flags, | ||
253 | &m_unit | 255 | &m_unit | ||
254 | ); | 256 | ); | ||
▲ Show 20 Lines • Show All 199 Lines • Show Last 20 Lines |