mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 06:05:58 -06:00
Critical fixes
This commit is contained in:
parent
3cdcd8c8c2
commit
88fd221dcb
2 changed files with 8 additions and 8 deletions
|
|
@ -174,7 +174,7 @@ inline constexpr bool is_upp_guest = false;
|
|||
template <class T>
|
||||
inline typename std::enable_if_t<is_trivially_relocatable<T>> Relocate(T *dst, T *src)
|
||||
{
|
||||
memcpy(dst, src, sizeof(T));
|
||||
memcpy(reinterpret_cast<void *>(dst), reinterpret_cast<void *>(src), sizeof(T));
|
||||
}
|
||||
|
||||
template <class T>
|
||||
|
|
@ -189,7 +189,7 @@ template <class T>
|
|||
inline void InsertRelocate(T *dst, T *src, int n)
|
||||
{
|
||||
if constexpr(is_trivially_relocatable<T>)
|
||||
memmove(dst, src, n * sizeof(T));
|
||||
memmove(reinterpret_cast<void *>(dst), reinterpret_cast<void *>(src), n * sizeof(T));
|
||||
else {
|
||||
static_assert(is_upp_guest<T>);
|
||||
if(n <= 0)
|
||||
|
|
@ -209,7 +209,7 @@ template <class T>
|
|||
inline void RemoveRelocate(T *dst, T *src, int n)
|
||||
{
|
||||
if constexpr(is_trivially_relocatable<T>)
|
||||
memmove(dst, src, n * sizeof(T));
|
||||
memmove(reinterpret_cast<void *>(dst), reinterpret_cast<void *>(src), n * sizeof(T));
|
||||
else {
|
||||
static_assert(is_upp_guest<T>);
|
||||
T *lim = src + n;
|
||||
|
|
@ -538,4 +538,4 @@ int CompareMap(const C& a, const C& b)
|
|||
return q;
|
||||
}
|
||||
return SgnCompare(a.GetCount(), b.GetCount());
|
||||
}
|
||||
}
|
||||
|
|
@ -35,7 +35,7 @@ public:
|
|||
String Name();
|
||||
String Id();
|
||||
String Bases();
|
||||
|
||||
|
||||
CXCursor GetCursor() { return cursor; }
|
||||
|
||||
ClangCursorInfo(CXCursor cursor, CXPrintingPolicy pp_id);
|
||||
|
|
@ -316,7 +316,7 @@ bool ClangVisitor::ProcessNode(CXCursor cursor)
|
|||
r.nspace = ci.Nspace();
|
||||
r.bases = ci.Bases();
|
||||
r.isvirtual = kind == CXCursor_CXXMethod && clang_CXXMethod_isVirtual(cursor);
|
||||
r.isstatic = clang_Cursor_getStorageClass(cursor) == CX_SC_Static;
|
||||
r.isstatic = (IsFunction(r.kind) || IsVariable(r.kind)) && clang_Cursor_getStorageClass(cursor) == CX_SC_Static;
|
||||
|
||||
if(findarg(r.kind, CXCursor_Constructor, CXCursor_Destructor) >= 0) {
|
||||
int q = r.id.Find('(');
|
||||
|
|
@ -352,7 +352,7 @@ bool ClangVisitor::ProcessNode(CXCursor cursor)
|
|||
if(findarg(ci.Kind(), CXCursor_CXXBaseSpecifier, CXCursor_TemplateRef) < 0) // suppress template untyping for : WithDlgLayout<TopWindow>
|
||||
q = tfn.Find(ref_loc);
|
||||
ClangCursorInfo ref_ci(q >= 0 ? tfn[q].cursor : ref, pp_id);
|
||||
|
||||
|
||||
ReferenceItem rm;
|
||||
rm.pos = sl.pos;
|
||||
rm.id = ref_ci.Id();
|
||||
|
|
@ -376,7 +376,7 @@ bool ClangVisitor::ProcessNode(CXCursor cursor)
|
|||
info.GetAdd(sl.path).refs.Add(rm);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
if(clang_getCursorKind(ref) == CXCursor_OverloadedDeclRef)
|
||||
for(unsigned int i = 0; i < clang_getNumOverloadedDecls(ref); i++)
|
||||
AddRef(clang_getOverloadedDecl(ref, i));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue