MCPcopy Create free account
hub / github.com/KDE/kdevelop / ClangProblem

Method ClangProblem

plugins/clang/duchain/clangproblem.cpp:84–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82ClangProblem::ClangProblem() = default;
83
84ClangProblem::ClangProblem(const ClangProblem& other)
85 : Problem(),
86 m_fixits(other.m_fixits)
87{
88 setSource(other.source());
89 setFinalLocation(other.finalLocation());
90 setFinalLocationMode(other.finalLocationMode());
91 setDescription(other.description());
92 setExplanation(other.explanation());
93 setSeverity(other.severity());
94
95 auto diagnostics = other.diagnostics();
96 for (auto& diagnostic : diagnostics) {
97 auto* clangDiagnostic = dynamic_cast<ClangProblem*>(diagnostic.data());
98 Q_ASSERT(clangDiagnostic);
99 diagnostic = ClangProblem::Ptr(new ClangProblem(*clangDiagnostic));
100 }
101 setDiagnostics(diagnostics);
102}
103
104ClangProblem::ClangProblem(CXDiagnostic diagnostic, CXTranslationUnit unit)
105{

Callers

nothing calls this directly

Calls 15

ClangStringClass · 0.85
prettyDiagnosticSpellingFunction · 0.85
fixitsForDiagnosticFunction · 0.85
toRangeMethod · 0.80
setRangeMethod · 0.80
RangeClass · 0.70
IndexedStringClass · 0.50
sourceMethod · 0.45
finalLocationMethod · 0.45
finalLocationModeMethod · 0.45
descriptionMethod · 0.45

Tested by

no test coverage detected