Home | History | Annotate | Download | only in Sema

Lines Matching defs:const

49     typedef bool (ResultBuilder::*LookupFilter)(const NamedDecl *) const;
60 llvm::SmallPtrSet<const Decl*, 16> AllDeclsFound;
62 typedef std::pair<const NamedDecl *, unsigned> DeclIndexPair;
72 llvm::PointerUnion<const NamedDecl *, DeclIndexPairVector*> DeclOrVector;
81 void Add(const NamedDecl *ND, unsigned Index) {
89 if (const NamedDecl *PrevND =
90 DeclOrVector.dyn_cast<const NamedDecl *>()) {
113 iterator begin() const;
114 iterator end() const;
174 const CodeCompletionContext &CompletionContext,
202 unsigned getBasePriority(const NamedDecl *D);
206 bool includeCodePatterns() const {
217 unsigned size() const { return Results.size(); }
218 bool empty() const { return Results.empty(); }
248 const CodeCompletionContext &getCompletionContext() const {
259 Sema &getSema() const { return SemaRef; }
262 CodeCompletionAllocator &getAllocator() const { return Allocator; }
264 CodeCompletionTUInfo &getCodeCompletionTUInfo() const { return CCTUInfo; }
273 bool isInterestingDecl(const NamedDecl *ND,
274 bool &AsNestedNameSpecifier) const;
283 const NamedDecl *Hiding);
318 void Ignore(const Decl *D) { AllDeclsFound.insert(D->getCanonicalDecl()); }
326 bool IsOrdinaryName(const NamedDecl *ND) const;
327 bool IsOrdinaryNonTypeName(const NamedDecl *ND) const;
328 bool IsIntegralConstantValue(const NamedDecl *ND) const;
329 bool IsOrdinaryNonValueName(const NamedDecl *ND) const;
330 bool IsNestedNameSpecifier(const NamedDecl *ND) const;
331 bool IsEnum(const NamedDecl *ND) const;
332 bool IsClassOrStruct(const NamedDecl *ND) const;
333 bool IsUnion(const NamedDecl *ND) const;
334 bool IsNamespace(const NamedDecl *ND) const;
335 bool IsNamespaceOrAlias(const NamedDecl *ND) const;
336 bool IsType(const NamedDecl *ND) const;
337 bool IsMember(const NamedDecl *ND) const;
338 bool IsObjCIvar(const NamedDecl *ND) const;
339 bool IsObjCMessageReceiver(const NamedDecl *ND) const;
340 bool IsObjCMessageReceiverOrLambdaCapture(const NamedDecl *ND) const;
341 bool IsObjCCollection(const NamedDecl *ND) const;
342 bool IsImpossibleToSatisfy(const NamedDecl *ND) const;
348 llvm::PointerUnion<const NamedDecl *, const DeclIndexPair *> DeclOrIterator;
361 pointer(const DeclIndexPair &Value) : Value(Value) { }
363 const DeclIndexPair *operator->() const {
370 iterator(const NamedDecl *SingleDecl, unsigned Index)
373 iterator(const DeclIndexPair *Iterator)
377 if (DeclOrIterator.is<const NamedDecl *>()) {
383 const DeclIndexPair *I = DeclOrIterator.get<const DeclIndexPair*>();
395 reference operator*() const {
396 if (const NamedDecl *ND = DeclOrIterator.dyn_cast<const NamedDecl *>())
399 return *DeclOrIterator.get<const DeclIndexPair*>();
402 pointer operator->() const {
406 friend bool operator==(const iterator &X, const iterator &Y) {
412 friend bool operator!=(const iterator &X, const iterator &Y) {
418 ResultBuilder::ShadowMapEntry::begin() const {
422 if (const NamedDecl *ND = DeclOrVector.dyn_cast<const NamedDecl *>())
429 ResultBuilder::ShadowMapEntry::end() const {
430 if (DeclOrVector.is<const NamedDecl *>() || DeclOrVector.isNull())
451 const DeclContext *CurContext,
452 const DeclContext *TargetContext) {
453 SmallVector<const
455 for (const DeclContext *CommonAncestor = TargetContext;
467 const DeclContext *Parent = TargetParents.back();
470 if (const NamespaceDecl *Namespace = dyn_cast<NamespaceDecl>(Parent)) {
476 else if (const TagDecl *TD = dyn_cast<TagDecl>(Parent))
484 bool ResultBuilder::isInterestingDecl(const NamedDecl *ND,
485 bool &AsNestedNameSpecifier) const {
510 if (const IdentifierInfo *Id = ND->getIdentifier()) {
520 const char *Name = Id->getNameStart();
556 const NamedDecl *Hiding) {
563 const DeclContext *HiddenCtx =
655 QualType clang::getDeclUsageType(ASTContext &C, const NamedDecl *ND) {
658 if (const TypeDecl *Type = dyn_cast<TypeDecl>(ND))
660 if (const ObjCInterfaceDecl *Iface = dyn_cast<ObjCInterfaceDecl>(ND))
664 if (const FunctionDecl *Function = dyn_cast<FunctionDecl>(ND))
666 else if (const ObjCMethodDecl *Method = dyn_cast<ObjCMethodDecl>(ND))
668 else if (const FunctionTemplateDecl *FunTmpl =
671 else if (const EnumConstantDecl *Enumerator = dyn_cast<EnumConstantDecl>(ND))
673 else if (const ObjCPropertyDecl *Property = dyn_cast<ObjCPropertyDecl>(ND))
675 else if (const ValueDecl *Value = dyn_cast<ValueDecl>(ND))
684 if (const ReferenceType *Ref = T->getAs<ReferenceType>()) {
689 if (const PointerType *Pointer = T->getAs<PointerType>()) {
698 if (const BlockPointerType *Block = T->getAs<BlockPointerType>()) {
703 if (const FunctionType *Function = T->getAs<FunctionType>()) {
714 unsigned ResultBuilder::getBasePriority(const NamedDecl *ND) {
719 const DeclContext *DC = ND->getDeclContext()->getRedeclContext();
722 if (const ImplicitParamDecl *ImplicitParam =
755 if (const ObjCMethodDecl *Method = dyn_cast<ObjCMethodDecl>(R.Declaration))
783 const NamedDecl *D = R.Declaration;
784 const CXXRecordDecl *Record = 0;
785 if (const ClassTemplateDecl *ClassTemplate = dyn_cast<ClassTemplateDecl>(D))
825 if (const UsingShadowDecl *Using =
834 const Decl *CanonDecl = R.Declaration->getCanonicalDecl();
854 const NamedDecl *ND = I->first;
913 const DeclContext *Ctx = R.Declaration->getDeclContext();
914 if (const NamespaceDecl *Namespace = dyn_cast<NamespaceDecl>(Ctx))
916 else if (const TagDecl *Tag = dyn_cast<TagDecl>(Ctx))
941 if (const UsingShadowDecl *Using = dyn_cast<UsingShadowDecl>(R.Declaration)) {
978 const DeclContext *Ctx = R.Declaration->getDeclContext();
979 if (const NamespaceDecl *Namespace = dyn_cast<NamespaceDecl>(Ctx))
981 else if (const TagDecl *Tag = dyn_cast<TagDecl>(Ctx))
995 if (const CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(R.Declaration))
1039 bool ResultBuilder::IsOrdinaryName(const NamedDecl *ND) const {
1055 bool ResultBuilder::IsOrdinaryNonTypeName(const NamedDecl *ND) const {
1071 bool ResultBuilder::IsIntegralConstantValue(const NamedDecl *ND) const {
1075 if (const ValueDecl *VD = dyn_cast<ValueDecl>(ND->getUnderlyingDecl()))
1084 bool ResultBuilder::IsOrdinaryNonValueName(const NamedDecl *ND) const {
1098 bool ResultBuilder::IsNestedNameSpecifier(const NamedDecl *ND) const {
1100 if (const ClassTemplateDecl *ClassTemplate = dyn_cast<ClassTemplateDecl>(ND))
1107 bool ResultBuilder::IsEnum(const NamedDecl *ND) const {
1112 bool ResultBuilder::IsClassOrStruct(const NamedDecl *ND) const {
1114 if (const ClassTemplateDecl *ClassTemplate = dyn_cast<ClassTemplateDecl>(ND))
1118 if (const RecordDecl *RD = dyn_cast<RecordDecl>(ND))
1127 bool ResultBuilder::IsUnion(const NamedDecl *ND) const {
1129 if (const ClassTemplateDecl *ClassTemplate = dyn_cast<ClassTemplateDecl>(ND))
1132 if (const RecordDecl *RD = dyn_cast<RecordDecl>(ND))
1139 bool ResultBuilder::IsNamespace(const NamedDecl *ND) const {
1145 bool ResultBuilder::IsNamespaceOrAlias(const NamedDecl *ND) const {
1150 bool ResultBuilder::IsType(const NamedDecl *ND) const {
1151 if (const UsingShadowDecl *Using = dyn_cast<UsingShadowDecl>(ND))
1160 bool ResultBuilder::IsMember(const NamedDecl *ND) const {
1161 if (const UsingShadowDecl *Using = dyn_cast<UsingShadowDecl>(ND))
1201 bool ResultBuilder::IsObjCMessageReceiver(const NamedDecl *ND) const {
1210 bool ResultBuilder::IsObjCMessageReceiverOrLambdaCapture(const NamedDecl *ND) const {
1214 const VarDecl *Var = dyn_cast<VarDecl>(ND);
1221 bool ResultBuilder::IsObjCCollection(const NamedDecl *ND) const {
1236 bool ResultBuilder::IsImpossibleToSatisfy(const NamedDecl *ND) const {
1242 bool ResultBuilder::IsObjCIvar(const NamedDecl *ND) const {
1271 static void AddTypeSpecifierResults(const LangOptions &LangOpts,
1286 Results.AddResult(Result("const", CCP_Type));
1348 const LangOptions &LangOpts,
1359 const LangOptions &LangOpts,
1396 static void AddObjCVisibilityResults(const LangOptions &LangOpts,
1399 static void AddObjCImplementationResults(const LangOptions &LangOpts,
1402 static void AddObjCInterfaceResults(const LangOptions &LangOpts,
1419 const LangOptions &LangOpts) {
1448 static PrintingPolicy getCompletionPrintingPolicy(const ASTContext &Context,
1449 const Preprocessor &PP) {
1467 static const char *GetCompletionTypeString(QualType T,
1469 const PrintingPolicy &Policy,
1473 if (const BuiltinType *BT = dyn_cast<BuiltinType>(T))
1477 if (const TagType *TagT = dyn_cast<TagType>(T))
2054 const PrintingPolicy &Policy,
2055 const NamedDecl *ND,
2067 if (const FunctionDecl *Function = dyn_cast<FunctionDecl>(ND))
2069 else if (const ObjCMethodDecl *Method = dyn_cast<ObjCMethodDecl>(ND))
2071 else if (const FunctionTemplateDecl *FunTmpl =
2074 else if (const EnumConstantDecl *Enumerator = dyn_cast<EnumConstantDecl>(ND))
2078 } else if (const ValueDecl *Value = dyn_cast<ValueDecl>(ND)) {
2080 } else if (const ObjCPropertyDecl *Property = dyn_cast<ObjCPropertyDecl>(ND))
2091 const NamedDecl *FunctionOrMethod,
2123 const PrintingPolicy &Policy,
2124 const ParmVarDecl *Param,
2253 const PrintingPolicy &Policy,
2254 const FunctionDecl *Function,
2261 const ParmVarDecl *Param = Function->getParamDecl(P);
2294 if (const FunctionProtoType *Proto
2306 const PrintingPolicy &Policy,
2307 const TemplateDecl *Template,
2388 const PrintingPolicy &Policy) {
2405 const FunctionDecl *Function) {
2406 const FunctionProtoType *Proto
2414 if (Proto->getTypeQuals() == Qualifiers::Const) {
2415 Result.AddInformativeChunk(" const");
2432 QualsStr += " const";
2441 static void AddTypedNameChunk(ASTContext &Context, const PrintingPolicy &Policy,
2442 const NamedDecl *ND,
2450 const char *OperatorName = 0;
2491 if (const RecordType *RecordTy = Ty->getAs<RecordType>())
2493 else if (const InjectedClassNameType *InjectedTy
2548 const NamedDecl *ND = Declaration;
2549 if (const ObjCMethodDecl *M = dyn_cast<ObjCMethodDecl>(ND))
2551 if (const ObjCPropertyDecl *PDecl = M->findPropertyDecl())
2554 if (const RawComment *RC =
2559 else if (const RawComment *RC =
2576 const MacroDirective *MD = PP.getMacroDirectiveHistory(Macro);
2578 const MacroInfo *MI = MD->getMacroInfo();
2622 const NamedDecl *ND = Declaration;
2627 if (const RawComment *RC = Ctx.getRawCommentForAnyRedecl(ND)) {
2630 else if (const ObjCMethodDecl *OMD = dyn_cast<ObjCMethodDecl>(ND))
2632 if (const ObjCPropertyDecl *PDecl = OMD->findPropertyDecl())
2633 if (const RawComment *RC = Ctx.getRawCommentForAnyRedecl(PDecl))
2652 if (const FunctionDecl *Function = dyn_cast<FunctionDecl>(ND)) {
2663 if (const FunctionTemplateDecl *FunTmpl = dyn_cast<FunctionTemplateDecl>(ND)) {
2717 if (const TemplateDecl *Template = dyn_cast<TemplateDecl>(ND)) {
2728 if (const ObjCMethodDecl *Method = dyn_cast<ObjCMethodDecl>(ND)) {
2823 CodeCompletionTUInfo &CCTUInfo) const {
2830 const FunctionProtoType *Proto
2835 const FunctionType *FT = getFunctionType();
2891 const LangOptions &LangOpts,
2914 CXCursorKind clang::getCursorKindForDecl(const Decl *D) {
2974 if (const TagDecl *TD = dyn_cast<TagDecl>(D)) {
3009 static void AddPrettyFunctionResults(const LangOptions &LangOpts,
3123 const CXXMethodDecl *Overridden = *M;
3323 Results.AddResult(Result("const"));
3387 const CodeCompleteExpressionData &Data) {
3538 } else if (const ObjCCategoryDecl *Category
3565 if (const PointerType *Ptr = BaseType->getAs<PointerType>())
3594 if (const RecordType *Record = BaseType->getAs<RecordType>()) {
3628 const ObjCObjectPointerType *ObjCPtr
3645 if (const ObjCObjectPointerType *ObjCPtr
3724 Results.AddResult("const");
3843 operator()(const OverloadCandidate &X, const OverloadCandidate &Y) const {
3924 if (const FunctionType *FType = Results[I].getFunctionType())
3925 if (const FunctionProtoType *Proto = dyn_cast<FunctionProtoType>(FType))
3941 if (const PointerType *Ptr = FunctionType->getAs<PointerType>())
3943 else if (const BlockPointerType *BlockPtr
3946 else if (const MemberPointerType *MemPtr
3950 if (const FunctionProtoType *Proto
4418 static void AddObjCImplementationResults(const LangOptions &LangOpts,
4442 static void AddObjCInterfaceResults(const LangOptions &LangOpts,
4535 const char *EncodeType = "char[]";
4538 EncodeType = "const char[]";
4640 static void AddObjCVisibilityResults(const LangOptions &LangOpts,
4884 const ObjCList<ObjCProtocolDecl> &Protocols
4916 const ObjCList<ObjCProtocolDecl> &Protocols
5099 if (const ObjCObjectType *ObjType
5106 if (const ObjCObjectPointerType *Ptr = T->getAs<ObjCObjectPointerType>())
5338 if (const ObjCObjectType *Iface
5382 const ObjCMethodDecl *Method = cast<ObjCMethodDecl>(R.Declaration);
5415 if (const ObjCObjectType *Interface = T->getAs<ObjCObjectType>())
5585 else if (const ObjCObjectPointerType *QualID
5595 else if (const ObjCObjectPointerType *IFacePtr
6136 const ObjCList<ObjCProtocolDecl> &Protocols
6162 const ObjCList<ObjCProtocolDecl> &Protocols
6185 const ObjCList<ObjCProtocolDecl> &Protocols
6216 const PrintingPolicy &Policy,
6267 const char *CopiedKey;
6272 operator const char *() {
6356 if (const ObjCObjectPointerType *ObjCPointer