MCPcopy Create free account
hub / github.com/KDE/kdevelop / setTypeModifiers

Method setTypeModifiers

plugins/clang/duchain/builder.cpp:900–932  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

898//BEGIN setTypeModifiers
899template<CXTypeKind TK>
900void Visitor::setTypeModifiers(CXType type, AbstractType* kdevType) const
901{
902 quint64 modifiers = 0;
903 if (clang_isConstQualifiedType(type)) {
904 modifiers |= AbstractType::ConstModifier;
905 }
906 if (clang_isVolatileQualifiedType(type)) {
907 modifiers |= AbstractType::VolatileModifier;
908 }
909#if CINDEX_VERSION_MINOR >= 60
910 if (TK == CXType_Atomic) {
911 modifiers |= AbstractType::AtomicModifier;
912 }
913#endif
914 if (TK == CXType_Short || TK == CXType_UShort) {
915 modifiers |= AbstractType::ShortModifier;
916 }
917 if (TK == CXType_Long || TK == CXType_LongDouble || TK == CXType_ULong) {
918 modifiers |= AbstractType::LongModifier;
919 }
920 if (TK == CXType_LongLong || TK == CXType_ULongLong) {
921 modifiers |= AbstractType::LongLongModifier;
922 }
923 if (TK == CXType_SChar) {
924 modifiers |= AbstractType::SignedModifier;
925 }
926 if (TK == CXType_UChar || TK == CXType_UInt || TK == CXType_UShort
927 || TK == CXType_UInt128 || TK == CXType_ULong || TK == CXType_ULongLong)
928 {
929 modifiers |= AbstractType::UnsignedModifier;
930 }
931 kdevType->setModifiers(modifiers);
932}
933//END setTypeModifiers
934
935void Visitor::setTypeSize(CXType type, AbstractType* kdevType) const

Callers

nothing calls this directly

Calls 1

setModifiersMethod · 0.80

Tested by

no test coverage detected