From af023844d460d5a1530ebb5e4faa80460f69164b Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 2 Feb 2018 13:26:00 +0100 Subject: qdoc: Hide clang errors for \fn commands in prepare phase MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When clang parsing errors were detected in the prepare phase, they were being printed without the preceding qdoc warning that shows where they occur in the source file. The qdoc warning was not printed because qdoc was running in the prepare phase, but the clang errors were printed, and that was wrong. This update ensures that the clang parsing errors are only printed in the generate phase (or in singleexec mode). Change-Id: I011fa06626a5e9930fde329113d2bbac8830473b Reviewed-by: Topi Reiniƶ --- src/qdoc/clangcodeparser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qdoc/clangcodeparser.cpp b/src/qdoc/clangcodeparser.cpp index 6a6908914..9c8a5c2b5 100644 --- a/src/qdoc/clangcodeparser.cpp +++ b/src/qdoc/clangcodeparser.cpp @@ -1442,7 +1442,7 @@ Node* ClangCodeParser::parseFnArg(const Location& location, const QString& fnArg visitor.visitFnArg(cur, &fnNode, ignoreSignature); if (fnNode == 0) { unsigned diagnosticCount = clang_getNumDiagnostics(tu); - if (diagnosticCount > 0) { + if (diagnosticCount > 0 && (!Generator::preparing() || Generator::singleExec())) { bool report = true; QStringList signature = fnArg.split(QLatin1String("::")); if (signature.size() > 1) { -- cgit v1.2.1