static void checkForIBOutlets(const Decl *D, SymbolPropertySet &PropSet) {
if (D->hasAttr<IBOutletAttr>()) {
- PropSet |= (unsigned)SymbolProperty::IBAnnotated;
+ PropSet |= (SymbolPropertySet)SymbolProperty::IBAnnotated;
} else if (D->hasAttr<IBOutletCollectionAttr>()) {
- PropSet |= (unsigned)SymbolProperty::IBAnnotated;
- PropSet |= (unsigned)SymbolProperty::IBOutletCollection;
+ PropSet |= (SymbolPropertySet)SymbolProperty::IBAnnotated;
+ PropSet |= (SymbolPropertySet)SymbolProperty::IBOutletCollection;
}
}
Info.Lang = SymbolLanguage::C;
if (isFunctionLocalSymbol(D)) {
- Info.Properties |= (unsigned)SymbolProperty::Local;
+ Info.Properties |= (SymbolPropertySet)SymbolProperty::Local;
}
if (const TagDecl *TD = dyn_cast<TagDecl>(D)) {
if (!CXXRec->isCLike()) {
Info.Lang = SymbolLanguage::CXX;
if (CXXRec->getDescribedClassTemplate()) {
- Info.Properties |= (unsigned)SymbolProperty::Generic;
+ Info.Properties |= (SymbolPropertySet)SymbolProperty::Generic;
}
}
}
if (isa<ClassTemplatePartialSpecializationDecl>(D)) {
- Info.Properties |= (unsigned)SymbolProperty::Generic;
- Info.Properties |= (unsigned)SymbolProperty::TemplatePartialSpecialization;
+ Info.Properties |= (SymbolPropertySet)SymbolProperty::Generic;
+ Info.Properties |=
+ (SymbolPropertySet)SymbolProperty::TemplatePartialSpecialization;
} else if (isa<ClassTemplateSpecializationDecl>(D)) {
- Info.Properties |= (unsigned)SymbolProperty::Generic;
- Info.Properties |= (unsigned)SymbolProperty::TemplateSpecialization;
+ Info.Properties |= (SymbolPropertySet)SymbolProperty::Generic;
+ Info.Properties |=
+ (SymbolPropertySet)SymbolProperty::TemplateSpecialization;
}
} else if (auto *VD = dyn_cast<VarDecl>(D)) {
if (isa<VarTemplatePartialSpecializationDecl>(D)) {
Info.Lang = SymbolLanguage::CXX;
- Info.Properties |= (unsigned)SymbolProperty::Generic;
- Info.Properties |= (unsigned)SymbolProperty::TemplatePartialSpecialization;
+ Info.Properties |= (SymbolPropertySet)SymbolProperty::Generic;
+ Info.Properties |=
+ (SymbolPropertySet)SymbolProperty::TemplatePartialSpecialization;
} else if (isa<VarTemplateSpecializationDecl>(D)) {
Info.Lang = SymbolLanguage::CXX;
- Info.Properties |= (unsigned)SymbolProperty::Generic;
- Info.Properties |= (unsigned)SymbolProperty::TemplateSpecialization;
+ Info.Properties |= (SymbolPropertySet)SymbolProperty::Generic;
+ Info.Properties |=
+ (SymbolPropertySet)SymbolProperty::TemplateSpecialization;
} else if (VD->getDescribedVarTemplate()) {
Info.Lang = SymbolLanguage::CXX;
- Info.Properties |= (unsigned)SymbolProperty::Generic;
+ Info.Properties |= (SymbolPropertySet)SymbolProperty::Generic;
}
} else {
if (!ClsD)
ClsD = cast<ObjCImplementationDecl>(D)->getClassInterface();
if (isUnitTestCase(ClsD))
- Info.Properties |= (unsigned)SymbolProperty::UnitTest;
+ Info.Properties |= (SymbolPropertySet)SymbolProperty::UnitTest;
break;
}
case Decl::ObjCProtocol:
else
ClsD = cast<ObjCCategoryImplDecl>(D)->getClassInterface();
if (isUnitTestCase(ClsD))
- Info.Properties |= (unsigned)SymbolProperty::UnitTest;
+ Info.Properties |= (SymbolPropertySet)SymbolProperty::UnitTest;
break;
}
case Decl::ObjCMethod: {
}
Info.Lang = SymbolLanguage::ObjC;
if (isUnitTest(MD))
- Info.Properties |= (unsigned)SymbolProperty::UnitTest;
+ Info.Properties |= (SymbolPropertySet)SymbolProperty::UnitTest;
if (D->hasAttr<IBActionAttr>())
- Info.Properties |= (unsigned)SymbolProperty::IBAnnotated;
+ Info.Properties |= (SymbolPropertySet)SymbolProperty::IBAnnotated;
break;
}
case Decl::ObjCProperty:
checkForIBOutlets(D, Info.Properties);
if (auto *Annot = D->getAttr<AnnotateAttr>()) {
if (Annot->getAnnotation() == "gk_inspectable")
- Info.Properties |= (unsigned)SymbolProperty::GKInspectable;
+ Info.Properties |= (SymbolPropertySet)SymbolProperty::GKInspectable;
}
break;
case Decl::ObjCIvar:
}
case Decl::ClassTemplate:
Info.Kind = SymbolKind::Class;
- Info.Properties |= (unsigned)SymbolProperty::Generic;
+ Info.Properties |= (SymbolPropertySet)SymbolProperty::Generic;
Info.Lang = SymbolLanguage::CXX;
break;
case Decl::FunctionTemplate:
Info.Kind = SymbolKind::Function;
- Info.Properties |= (unsigned)SymbolProperty::Generic;
+ Info.Properties |= (SymbolPropertySet)SymbolProperty::Generic;
Info.Lang = SymbolLanguage::CXX;
if (const CXXMethodDecl *MD = dyn_cast_or_null<CXXMethodDecl>(
cast<FunctionTemplateDecl>(D)->getTemplatedDecl())) {
case Decl::TypeAliasTemplate:
Info.Kind = SymbolKind::TypeAlias;
Info.Lang = SymbolLanguage::CXX;
- Info.Properties |= (unsigned)SymbolProperty::Generic;
+ Info.Properties |= (SymbolPropertySet)SymbolProperty::Generic;
break;
case Decl::TypeAlias:
Info.Kind = SymbolKind::TypeAlias;
Info.Kind = SymbolKind::Using;
Info.SubKind = SymbolSubKind::UsingTypename;
Info.Lang = SymbolLanguage::CXX;
- Info.Properties |= (unsigned)SymbolProperty::Generic;
+ Info.Properties |= (SymbolPropertySet)SymbolProperty::Generic;
break;
case Decl::UnresolvedUsingValue:
Info.Kind = SymbolKind::Using;
Info.SubKind = SymbolSubKind::UsingValue;
Info.Lang = SymbolLanguage::CXX;
- Info.Properties |= (unsigned)SymbolProperty::Generic;
+ Info.Properties |= (SymbolPropertySet)SymbolProperty::Generic;
break;
case Decl::Binding:
Info.Kind = SymbolKind::Variable;
if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
if (FD->getTemplatedKind() ==
FunctionDecl::TK_FunctionTemplateSpecialization) {
- Info.Properties |= (unsigned)SymbolProperty::Generic;
- Info.Properties |= (unsigned)SymbolProperty::TemplateSpecialization;
+ Info.Properties |= (SymbolPropertySet)SymbolProperty::Generic;
+ Info.Properties |=
+ (SymbolPropertySet)SymbolProperty::TemplateSpecialization;
}
}
- if (Info.Properties & (unsigned)SymbolProperty::Generic)
+ if (Info.Properties & (SymbolPropertySet)SymbolProperty::Generic)
Info.Lang = SymbolLanguage::CXX;
if (auto *attr = D->getExternalSourceSymbolAttr()) {
void index::applyForEachSymbolProperty(SymbolPropertySet Props,
llvm::function_ref<void(SymbolProperty)> Fn) {
-#define APPLY_FOR_PROPERTY(K) \
- if (Props & (unsigned)SymbolProperty::K) \
- Fn(SymbolProperty::K)
+#define APPLY_FOR_PROPERTY(K) \
+ if (Props & (SymbolPropertySet)SymbolProperty::K) \
+ Fn(SymbolProperty::K)
APPLY_FOR_PROPERTY(Generic);
APPLY_FOR_PROPERTY(TemplatePartialSpecialization);