File indexing completed on 2024-05-12 04:39:14
0001 /* 0002 SPDX-FileCopyrightText: 2014 Jørgen Kvalsvik <lycantrophe@lavabit.com> 0003 SPDX-FileCopyrightText: 2014 Kevin Funk <kfunk@kde.org> 0004 0005 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0006 */ 0007 0008 #ifndef UNKNOWNDECLARATION_H 0009 #define UNKNOWNDECLARATION_H 0010 0011 #include "clangprivateexport.h" 0012 #include "clangproblem.h" 0013 0014 #include <language/duchain/identifier.h> 0015 0016 class KDEVCLANGPRIVATE_EXPORT UnknownDeclarationProblem : public ClangProblem 0017 { 0018 public: 0019 using Ptr = QExplicitlySharedDataPointer<UnknownDeclarationProblem>; 0020 using ConstPtr = QExplicitlySharedDataPointer<const UnknownDeclarationProblem>; 0021 0022 UnknownDeclarationProblem(CXDiagnostic diagnostic, CXTranslationUnit unit); 0023 0024 void setSymbol(const KDevelop::QualifiedIdentifier& identifier); 0025 0026 KDevelop::IAssistant::Ptr solutionAssistant() const override; 0027 0028 /** 0029 * @param declarations declarations to find matching include files for 0030 * @return list of paths of include files usable for the given declarations 0031 */ 0032 static QStringList findMatchingIncludeFiles(const QVector<KDevelop::Declaration*>& declarations); 0033 0034 private: 0035 KDevelop::QualifiedIdentifier m_identifier; 0036 }; 0037 0038 #endif // UNKNOWNDECLARATION_H