File indexing completed on 2024-05-12 04:39:13
0001 /* 0002 SPDX-FileCopyrightText: 2014 Kevin Funk <kfunk@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0005 */ 0006 0007 #ifndef TODOEXTRACTOR_H 0008 #define TODOEXTRACTOR_H 0009 0010 #include "clangprivateexport.h" 0011 0012 #include <language/duchain/problem.h> 0013 0014 #include <clang-c/Index.h> 0015 0016 class KDEVCLANGPRIVATE_EXPORT TodoExtractor 0017 { 0018 public: 0019 TodoExtractor(CXTranslationUnit unit, CXFile file); 0020 0021 /** 0022 * Retrieve the list of to-do problems this instance found 0023 */ 0024 QList<KDevelop::ProblemPointer> problems() const; 0025 0026 private: 0027 void extractTodos(); 0028 0029 CXTranslationUnit m_unit; 0030 CXFile m_file; 0031 QStringList m_todoMarkerWords; 0032 0033 QList<KDevelop::ProblemPointer> m_problems; 0034 }; 0035 0036 #endif // TODOEXTRACTOR_H