This commit is contained in:
Mirek Fidler 2022-10-09 20:10:15 +02:00
commit b6e8ba039f
2 changed files with 15 additions and 0 deletions

View file

@ -120,7 +120,18 @@ String ClangCursorInfo::Id()
case CXCursor_Constructor:
case CXCursor_Destructor:
case CXCursor_CXXMethod:
#ifdef UBUNTU2204_WORKAROUND
{
String h = RawId();
int q = 0;
while(findarg(h[q], ':', '*', '&', '(', ')', ' ') >= 0)
q++;
m = Scope();
m.Cat(~h + q, h.GetCount() - q);
}
#else
m = RawId();
#endif
break;
case CXCursor_ClassTemplate:
case CXCursor_VarDecl:
@ -376,7 +387,9 @@ void ClangVisitor::Do(CXTranslationUnit tu)
CXPrintingPolicy_SuppressTemplateArgsInCXXConstructors,
CXPrintingPolicy_TerseOutput,
CXPrintingPolicy_SuppressImplicitBase,
#ifndef UBUNTU2204_WORKAROUND
CXPrintingPolicy_FullyQualifiedName,
#endif
CXPrintingPolicy_Bool })
clang_PrintingPolicy_setProperty(pp_id, p, 1);

View file

@ -3,6 +3,8 @@
#include <ide/Common/Common.h>
#define UBUNTU2204_WORKAROUND // there appears to be a bug in Ubuntu 22.04.1LTS libclang 14
// Configuration
extern bool LibClangEnabled;