diff -Nuarp qttools-everywhere-src-6.7.2.orig/src/linguist/lupdate/clangtoolastreader.cpp qttools-everywhere-src-6.7.2/src/linguist/lupdate/clangtoolastreader.cpp
old
|
new
|
bool LupdateVisitor::VisitNamedDecl(clan
|
779 | 779 | if (!m_macro) |
780 | 780 | return true; |
781 | 781 | auto fullLocation = m_context->getFullLoc(namedDeclaration->getBeginLoc()); |
782 | | if (!fullLocation.isValid() || !fullLocation.getFileEntry()) |
| 782 | if (!fullLocation.isValid() || !fullLocation.getFileEntryRef()) |
783 | 783 | return true; |
784 | 784 | |
785 | | if (!LupdatePrivate::isFileSignificant(fullLocation.getFileEntry()->getName().str())) |
| 785 | if (!LupdatePrivate::isFileSignificant(fullLocation.getFileEntryRef()->getName().str())) |
786 | 786 | return true; |
787 | 787 | |
788 | 788 | qCDebug(lcClang) << "NamedDecl Name: " << QString::fromStdString(namedDeclaration->getQualifiedNameAsString()); |
diff -Nuarp qttools-everywhere-src-6.7.2.orig/src/qdoc/qdoc/src/qdoc/clang/AST/QualTypeNames.h qttools-everywhere-src-6.7.2/src/qdoc/qdoc/src/qdoc/clang/AST/QualTypeNames.h
old
|
new
|
static inline bool getFullyQualifiedTemp
|
84 | 84 | assert(ArgTDecl != nullptr); |
85 | 85 | QualifiedTemplateName *QTName = TName.getAsQualifiedTemplateName(); |
86 | 86 | |
87 | | if (QTName && !QTName->hasTemplateKeyword()) { |
88 | | NNS = QTName->getQualifier(); |
| 87 | if (QTName && |
| 88 | !QTName->hasTemplateKeyword() && |
| 89 | (NNS = QTName->getQualifier())) { |
89 | 90 | NestedNameSpecifier *QNNS = getFullyQualifiedNestedNameSpecifier( |
90 | 91 | Ctx, NNS, WithGlobalNsPrefix); |
91 | 92 | if (QNNS != NNS) { |
… |
… |
static inline NestedNameSpecifier *creat
|
288 | 289 | assert(Decl); |
289 | 290 | |
290 | 291 | const DeclContext *DC = Decl->getDeclContext()->getRedeclContext(); |
291 | | const auto *Outer = dyn_cast_or_null<NamedDecl>(DC); |
292 | | const auto *OuterNS = dyn_cast_or_null<NamespaceDecl>(DC); |
| 292 | const auto *Outer = dyn_cast<NamedDecl>(DC); |
| 293 | const auto *OuterNS = dyn_cast<NamespaceDecl>(DC); |
293 | 294 | if (Outer && !(OuterNS && OuterNS->isAnonymousNamespace())) { |
294 | 295 | if (OuterNS) { |
295 | 296 | return createNestedNameSpecifier(Ctx, OuterNS, WithGlobalNsPrefix); |
diff -Nuarp qttools-everywhere-src-6.7.2.orig/src/qdoc/qdoc/src/qdoc/clangcodeparser.cpp qttools-everywhere-src-6.7.2/src/qdoc/qdoc/src/qdoc/clangcodeparser.cpp
old
|
new
|
static std::string get_expression_as_str
|
167 | 167 | * If the parameter has no default value the empty string will be returned. |
168 | 168 | */ |
169 | 169 | static std::string get_default_value_initializer_as_string(const clang::TemplateTypeParmDecl* parameter) { |
| 170 | #if LIBCLANG_VERSION_MAJOR >= 19 |
| 171 | return (parameter && parameter->hasDefaultArgument()) ? |
| 172 | get_fully_qualified_type_name(parameter->getDefaultArgument().getArgument().getAsType(), parameter->getASTContext()) : |
| 173 | ""; |
| 174 | #else |
170 | 175 | return (parameter && parameter->hasDefaultArgument()) ? |
171 | 176 | get_fully_qualified_type_name(parameter->getDefaultArgument(), parameter->getASTContext()) : |
172 | 177 | ""; |
| 178 | #endif |
173 | 179 | |
174 | 180 | } |
175 | 181 | |
… |
… |
static std::string get_default_value_ini
|
183 | 189 | * If the parameter as no default value the empty string will be returned. |
184 | 190 | */ |
185 | 191 | static std::string get_default_value_initializer_as_string(const clang::NonTypeTemplateParmDecl* parameter) { |
| 192 | #if LIBCLANG_VERSION_MAJOR >= 19 |
| 193 | return (parameter && parameter->hasDefaultArgument()) ? |
| 194 | get_expression_as_string(parameter->getDefaultArgument().getSourceExpression(), parameter->getASTContext()) : ""; |
| 195 | #else |
186 | 196 | return (parameter && parameter->hasDefaultArgument()) ? |
187 | 197 | get_expression_as_string(parameter->getDefaultArgument(), parameter->getASTContext()) : ""; |
| 198 | #endif |
188 | 199 | |
189 | 200 | } |
190 | 201 | |
… |
… |
static std::string get_default_value_ini
|
204 | 215 | const clang::TemplateName template_name = parameter->getDefaultArgument().getArgument().getAsTemplate(); |
205 | 216 | |
206 | 217 | llvm::raw_string_ostream ss{default_value}; |
207 | | template_name.print(ss, parameter->getASTContext().getPrintingPolicy(), clang::TemplateName::Qualified::Fully); |
| 218 | template_name.print(ss, parameter->getASTContext().getPrintingPolicy(), clang::TemplateName::Qualified::AsWritten); |
208 | 219 | } |
209 | 220 | |
210 | 221 | return default_value; |