Lines Matching full:declarationname
1 //===-- DeclarationName.cpp - Declaration names implementation --*- C++ -*-===//
10 // This file implements the DeclarationName and DeclarationNameTable
16 #include "clang/AST/DeclarationName.h"
59 /// This identifier is stored here rather than directly in DeclarationName so as
80 int DeclarationName::compare(DeclarationName LHS, DeclarationName RHS) {
85 case DeclarationName::Identifier: {
94 case DeclarationName::ObjCZeroArgSelector:
95 case DeclarationName::ObjCOneArgSelector:
96 case DeclarationName::ObjCMultiArgSelector: {
112 case DeclarationName::CXXConstructorName:
113 case DeclarationName::CXXDestructorName:
114 case DeclarationName::CXXConversionFunctionName:
121 case DeclarationName::CXXOperatorName:
125 case DeclarationName::CXXLiteralOperatorName:
129 case DeclarationName::CXXUsingDirective:
133 llvm_unreachable("Invalid DeclarationName Kind!");
136 raw_ostream &operator<<(raw_ostream &OS, DeclarationName N) {
138 case DeclarationName::Identifier:
143 case DeclarationName::ObjCZeroArgSelector:
144 case DeclarationName::ObjCOneArgSelector:
145 case DeclarationName::ObjCMultiArgSelector:
148 case DeclarationName::CXXConstructorName: {
155 case DeclarationName::CXXDestructorName: {
163 case DeclarationName::CXXOperatorName: {
179 case DeclarationName::CXXLiteralOperatorName:
182 case DeclarationName::CXXConversionFunctionName: {
189 case DeclarationName::CXXUsingDirective:
198 DeclarationName::NameKind DeclarationName::getNameKind() const {
235 bool DeclarationName::isDependentName() const {
240 std::string DeclarationName::getAsString() const {
247 QualType DeclarationName::getCXXNameType() const {
254 OverloadedOperatorKind DeclarationName::getCXXOverloadedOperator() const {
264 IdentifierInfo *DeclarationName::getCXXLiteralIdentifier() const {
271 void *DeclarationName::getFETokenInfoAsVoidSlow() const {
292 void DeclarationName::setFETokenInfo(void *T) {
317 DeclarationName DeclarationName::getUsingDirectiveName() {
325 return DeclarationName(Ptr);
328 void DeclarationName::dump() const {
356 DeclarationName DeclarationNameTable::getCXXConstructorName(CanQualType Ty) {
357 return getCXXSpecialName(DeclarationName::CXXConstructorName,
361 DeclarationName DeclarationNameTable::getCXXDestructorName(CanQualType Ty) {
362 return getCXXSpecialName(DeclarationName::CXXDestructorName,
366 DeclarationName
368 return getCXXSpecialName(DeclarationName::CXXConversionFunctionName, Ty);
371 DeclarationName
372 DeclarationNameTable::getCXXSpecialName(DeclarationName::NameKind Kind,
374 assert(Kind >= DeclarationName::CXXConstructorName &&
375 Kind <= DeclarationName::CXXConversionFunctionName &&
382 case DeclarationName::CXXConstructorName:
386 case DeclarationName::CXXDestructorName:
390 case DeclarationName::CXXConversionFunctionName:
394 return DeclarationName();
404 return DeclarationName(Name);
412 return DeclarationName(SpecialName);
415 DeclarationName
417 return DeclarationName(&CXXOperatorNames[(unsigned)Op]);
420 DeclarationName
432 return DeclarationName (Name);
440 return DeclarationName(LiteralName);
443 DeclarationNameLoc::DeclarationNameLoc(DeclarationName Name) {
445 case DeclarationName::Identifier:
447 case DeclarationName::CXXConstructorName:
448 case DeclarationName::CXXDestructorName:
449 case DeclarationName::CXXConversionFunctionName:
452 case DeclarationName::CXXOperatorName:
456 case DeclarationName::CXXLiteralOperatorName:
459 case DeclarationName::ObjCZeroArgSelector:
460 case DeclarationName::ObjCOneArgSelector:
461 case DeclarationName::ObjCMultiArgSelector:
464 case DeclarationName::CXXUsingDirective:
471 case DeclarationName::Identifier:
472 case DeclarationName::ObjCZeroArgSelector:
473 case DeclarationName::ObjCOneArgSelector:
474 case DeclarationName::ObjCMultiArgSelector:
475 case DeclarationName::CXXOperatorName:
476 case DeclarationName::CXXLiteralOperatorName:
477 case DeclarationName::CXXUsingDirective:
480 case DeclarationName::CXXConstructorName:
481 case DeclarationName::CXXDestructorName:
482 case DeclarationName::CXXConversionFunctionName:
493 case DeclarationName::Identifier:
494 case DeclarationName::ObjCZeroArgSelector:
495 case DeclarationName::ObjCOneArgSelector:
496 case DeclarationName::ObjCMultiArgSelector:
497 case DeclarationName::CXXOperatorName:
498 case DeclarationName::CXXLiteralOperatorName:
499 case DeclarationName::CXXUsingDirective:
502 case DeclarationName::CXXConstructorName:
503 case DeclarationName::CXXDestructorName:
504 case DeclarationName::CXXConversionFunctionName:
522 case DeclarationName::Identifier:
523 case DeclarationName::ObjCZeroArgSelector:
524 case DeclarationName::ObjCOneArgSelector:
525 case DeclarationName::ObjCMultiArgSelector:
526 case DeclarationName::CXXOperatorName:
527 case DeclarationName::CXXLiteralOperatorName:
528 case DeclarationName::CXXUsingDirective:
532 case DeclarationName::CXXConstructorName:
533 case DeclarationName::CXXDestructorName:
534 case DeclarationName::CXXConversionFunctionName:
536 if (Name.getNameKind() == DeclarationName::CXXDestructorName)
538 else if (Name.getNameKind() == DeclarationName::CXXConversionFunctionName)
550 case DeclarationName::Identifier:
553 case DeclarationName::CXXOperatorName: {
558 case DeclarationName::CXXLiteralOperatorName: {
563 case DeclarationName::CXXConstructorName:
564 case DeclarationName::CXXDestructorName:
565 case DeclarationName::CXXConversionFunctionName:
572 case DeclarationName::ObjCZeroArgSelector:
573 case DeclarationName::ObjCOneArgSelector:
574 case DeclarationName::ObjCMultiArgSelector:
575 case DeclarationName::CXXUsingDirective: