Should eventually be replaced by upstream fix, see https://bugreports.qt.io/browse/QTBUG-129146. diff --git a/src/linguist/lupdate/clangtoolastreader.cpp b/src/linguist/lupdate/clangtoolastreader.cpp index 6b85c6c..63ddf3d 100644 --- a/src/linguist/lupdate/clangtoolastreader.cpp +++ b/src/linguist/lupdate/clangtoolastreader.cpp @@ -782,7 +782,7 @@ bool LupdateVisitor::VisitNamedDecl(clang::NamedDecl *namedDeclaration) if (!fullLocation.isValid() || !fullLocation.getFileEntry()) return true; - if (!LupdatePrivate::isFileSignificant(fullLocation.getFileEntry()->getName().str())) + if (!LupdatePrivate::isFileSignificant(fullLocation.getFileEntry()->tryGetRealPathName().str())) return true; qCDebug(lcClang) << "NamedDecl Name: " << QString::fromStdString(namedDeclaration->getQualifiedNameAsString()); diff --git a/src/qdoc/qdoc/src/qdoc/clangcodeparser.cpp b/src/qdoc/qdoc/src/qdoc/clangcodeparser.cpp index bd3cc63..c5ec3d4 100644 --- a/src/qdoc/qdoc/src/qdoc/clangcodeparser.cpp +++ b/src/qdoc/qdoc/src/qdoc/clangcodeparser.cpp @@ -168,7 +168,11 @@ static std::string get_expression_as_string(const clang::Expr* expression, const */ static std::string get_default_value_initializer_as_string(const clang::TemplateTypeParmDecl* parameter) { return (parameter && parameter->hasDefaultArgument()) ? +#if LIBCLANG_VERSION_MAJOR >= 19 + get_fully_qualified_type_name(parameter->getDefaultArgument().getTypeSourceInfo()->getType(), parameter->getASTContext()) : +#else get_fully_qualified_type_name(parameter->getDefaultArgument(), parameter->getASTContext()) : +#endif ""; } @@ -184,7 +188,11 @@ static std::string get_default_value_initializer_as_string(const clang::Template */ static std::string get_default_value_initializer_as_string(const clang::NonTypeTemplateParmDecl* parameter) { return (parameter && parameter->hasDefaultArgument()) ? +#if LIBCLANG_VERSION_MAJOR >= 19 + get_expression_as_string(parameter->getDefaultArgument().getLocInfo().getAsExpr(), parameter->getASTContext()) : ""; +#else get_expression_as_string(parameter->getDefaultArgument(), parameter->getASTContext()) : ""; +#endif } @@ -204,7 +212,7 @@ static std::string get_default_value_initializer_as_string(const clang::Template const clang::TemplateName template_name = parameter->getDefaultArgument().getArgument().getAsTemplate(); llvm::raw_string_ostream ss{default_value}; - template_name.print(ss, parameter->getASTContext().getPrintingPolicy(), clang::TemplateName::Qualified::Fully); + template_name.print(ss, parameter->getASTContext().getPrintingPolicy(), clang::TemplateName::Qualified::AsWritten); } return default_value;