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

Method createDeclaration

plugins/clang/duchain/builder.cpp:454–468  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

452
453 template<CXCursorKind CK, class DeclType>
454 Declaration* createDeclaration(CXCursor cursor, const Identifier& id, DUContext *context)
455 {
456 auto decl = createDeclarationCommon<CK, DeclType>(cursor, id);
457 auto type = createType<CK>(cursor);
458 if (type) {
459 setTypeSize(clang_getCursorType(cursor), type);
460 }
461
462 DUChainWriteLocker lock;
463 if (context)
464 decl->setInternalContext(context);
465 setDeclType<CK>(decl, type);
466 setDeclInCtxtData<CK>(cursor, decl);
467 return decl;
468 }
469
470 template<CXCursorKind CK, DUContext::ContextType Type>
471 DUContext* createContext(CXCursor cursor, const QualifiedIdentifier& scopeId = {})

Callers

nothing calls this directly

Calls 1

setInternalContextMethod · 0.80

Tested by

no test coverage detected