diff options
Diffstat (limited to 'src/clangparser.cpp')
-rw-r--r-- | src/clangparser.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/clangparser.cpp b/src/clangparser.cpp index 76ee426..4a484ff 100644 --- a/src/clangparser.cpp +++ b/src/clangparser.cpp @@ -25,7 +25,8 @@ //-------------------------------------------------------------------------- -std::mutex g_clangMutex; +static std::mutex g_clangMutex; +static std::mutex g_docCrossReferenceMutex; ClangParser *ClangParser::instance() { @@ -696,6 +697,7 @@ void ClangTUParser::linkIdentifier(CodeOutputInterface &ol,FileDef *fd, p->currentMemberDef && d->definitionType()==Definition::TypeMember && (p->currentMemberDef!=d || p->currentLine<line)) // avoid self-reference { + std::lock_guard<std::mutex> lock(g_docCrossReferenceMutex); addDocCrossReference(toMemberDefMutable(p->currentMemberDef),toMemberDefMutable(d)); } writeMultiLineCodeLink(ol,fd,line,column,d,text); |