From 171ecb1c48326cf3b6abad1fad317ffa0975f799 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Tue, 10 Mar 2020 14:14:59 +0100 Subject: qdoc: ClangCodeParser: Clear the stored namespace After processing a source file, we need to clear any potential stored namespace scope. Left uncleared, if the next source file is not parsed with Clang but still use ClangCodeParser::parseFnArg(), the incorrect scope is applied. Change-Id: Iba1e791ac01c0f1c699a808ce644b4edbb682399 Reviewed-by: Paul Wicking --- src/qdoc/clangcodeparser.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qdoc/clangcodeparser.cpp b/src/qdoc/clangcodeparser.cpp index a0074a091..550039b2a 100644 --- a/src/qdoc/clangcodeparser.cpp +++ b/src/qdoc/clangcodeparser.cpp @@ -1586,6 +1586,7 @@ void ClangCodeParser::parseSourceFile(const Location & /*location*/, const QStri clang_disposeTokens(tu, tokens, numTokens); clang_disposeTranslationUnit(tu); clang_disposeIndex(index_); + namespaceScope_.clear(); } /*! -- cgit v1.2.3