Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
KDevelop
KDevelop
Commits
c84cd797
Commit
c84cd797
authored
Oct 11, 2022
by
Morten Danielsen Volden
Committed by
Morten Volden
Oct 11, 2022
Browse files
Only use feature CXType_Atomic if the compiler version supports it
parent
048e144d
Pipeline
#246501
passed with stage
in 27 minutes and 39 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
plugins/clang/duchain/builder.cpp
View file @
c84cd797
...
...
@@ -520,12 +520,14 @@ struct Visitor
return
new
StructureType
();
}
#if CINDEX_VERSION_MINOR >= 60
template
<
CXTypeKind
TK
,
EnableIf
<
TK
==
CXType_Atomic
>
=
dummy
>
AbstractType
*
createType
(
CXType
type
,
CXCursor
parent
)
{
// Decompose the atomic type.
return
makeType
(
clang_Type_getValueType
(
type
),
parent
);
}
#endif
template
<
CXTypeKind
TK
,
EnableIf
<
CursorKindTraits
::
isPointerType
(
TK
)>
=
dummy
>
AbstractType
*
createType
(
CXType
type
,
CXCursor
parent
)
...
...
@@ -901,9 +903,11 @@ void Visitor::setTypeModifiers(CXType type, AbstractType* kdevType) const
if
(
clang_isVolatileQualifiedType
(
type
))
{
modifiers
|=
AbstractType
::
VolatileModifier
;
}
#if CINDEX_VERSION_MINOR >= 60
if
(
TK
==
CXType_Atomic
)
{
modifiers
|=
AbstractType
::
AtomicModifier
;
}
#endif
if
(
TK
==
CXType_Short
||
TK
==
CXType_UShort
)
{
modifiers
|=
AbstractType
::
ShortModifier
;
}
...
...
@@ -1399,7 +1403,9 @@ AbstractType *Visitor::makeType(CXType type, CXCursor parent)
#if CINDEX_VERSION_MINOR >= 38
UseKind
(
CXType_Float128
);
#endif
#if CINDEX_VERSION_MINOR >= 60
UseKind
(
CXType_Atomic
);
#endif
UseKind
(
CXType_Complex
);
UseKind
(
CXType_OCLImage1dRO
);
UseKind
(
CXType_OCLImage1dArrayRO
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment