int main(int argc, const char **argv) { clang_enableStackTraces(); if (argc > 2 && strstr(argv[1], "-code-completion-at=") == argv[1]) return perform_code_completion(argc, argv); if (argc > 2 && strstr(argv[1], "-cursor-at=") == argv[1]) return inspect_cursor_at(argc, argv); else if (argc >= 4 && strncmp(argv[1], "-test-load-tu", 13) == 0) { CXCursorVisitor I = GetVisitor(argv[1] + 13); if (I) return perform_test_load_tu(argv[2], argv[3], argc >= 5 ? argv[4] : 0, I, NULL); } else if (argc >= 4 && strncmp(argv[1], "-test-load-source", 17) == 0) { CXCursorVisitor I = GetVisitor(argv[1] + 17); if (I) return perform_test_load_source(argc - 3, argv + 3, argv[2], I, NULL); } else if (argc >= 4 && strcmp(argv[1], "-test-file-scan") == 0) return perform_file_scan(argv[2], argv[3], argc >= 5 ? argv[4] : 0); else if (argc > 2 && strstr(argv[1], "-test-annotate-tokens=") == argv[1]) return perform_token_annotation(argc, argv); else if (argc > 2 && strcmp(argv[1], "-test-inclusion-stack-source") == 0) return perform_test_load_source(argc - 2, argv + 2, "all", NULL, PrintInclusionStack); else if (argc > 2 && strcmp(argv[1], "-test-inclusion-stack-tu") == 0) return perform_test_load_tu(argv[2], "all", NULL, NULL, PrintInclusionStack); print_usage(); return 1; }
int main(int argc, char *argv[]) { QLoggingCategory::setFilterRules(QStringLiteral("*.debug=false")); QCoreApplication::setOrganizationName(QStringLiteral("QtProject")); QCoreApplication::setOrganizationDomain(QStringLiteral("qt-project.org")); QCoreApplication::setApplicationName(QStringLiteral("ClangBackend")); QCoreApplication::setApplicationVersion(QStringLiteral("1.0.0")); QCoreApplication application(argc, argv); const QString connection = processArguments(application); ClangBackEnd::Messages::registerMessages(); clang_toggleCrashRecovery(true); clang_enableStackTraces(); ClangBackEnd::ClangIpcServer clangIpcServer; ClangBackEnd::ConnectionServer connectionServer(connection); connectionServer.start(); connectionServer.setIpcServer(&clangIpcServer); return application.exec(); }
SEXP R_clang_enableStackTraces() { SEXP r_ans = R_NilValue; clang_enableStackTraces(); return(r_ans); }
int carcmttest_main(int argc, const char **argv) { clang_enableStackTraces(); if (argc == 3 && strncmp(argv[1], "-mt-migrate-directory", 21) == 0) return print_remappings(argv[2]); if (argc > 1) return print_remappings_filelist(argv+1, argc-1); print_usage(); return 1; }
void initializeClang() { if (clangInitialised) return; QMutexLocker locker(&initialisationMutex); if (clangInitialised) return; clang_toggleCrashRecovery(1); clang_enableStackTraces(); clangInitialised = true; qRegisterMetaType<ClangCodeModel::Diagnostic>(); qRegisterMetaType<QList<ClangCodeModel::Diagnostic> >(); }