summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@qt.io>2020-03-10 14:14:59 +0100
committerTopi Reinio <topi.reinio@qt.io>2020-03-10 14:29:11 +0100
commit171ecb1c48326cf3b6abad1fad317ffa0975f799 (patch)
tree9df01b4ca340e4f0b8248f2b3c5d35e03dc76e36
parentcdd46a7d4ab2862aab286f82532356a89e43f262 (diff)
downloadqttools-171ecb1c48326cf3b6abad1fad317ffa0975f799.tar.gz
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 <paul.wicking@qt.io>
-rw-r--r--src/qdoc/clangcodeparser.cpp1
1 files changed, 1 insertions, 0 deletions
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();
}
/*!