clang: include/clang/AST/DeclarationName.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13#ifndef LLVM_CLANG_AST_DECLARATIONNAME_H

14#define LLVM_CLANG_AST_DECLARATIONNAME_H

15

22#include "llvm/ADT/DenseMapInfo.h"

23#include "llvm/ADT/FoldingSet.h"

24#include "llvm/ADT/STLExtras.h"

25#include "llvm/Support/Compiler.h"

26#include "llvm/Support/type_traits.h"

27#include

28#include

29#include

30#include

31

33

35template <typename> class CanQual;

41

43

45

46

47

48

49

50

51

52class alignas(IdentifierInfoAlignment) CXXSpecialNameExtra

53 : public llvm::FoldingSetNode {

56

57

59

60

61

62

63 void *FETokenInfo;

64

65 CXXSpecialNameExtra(QualType QT) : Type(QT), FETokenInfo(nullptr) {}

66

67public:

68 void Profile(llvm::FoldingSetNodeID &ID) {

69 ID.AddPointer(Type.getAsOpaquePtr());

70 }

71};

72

73

74class alignas(IdentifierInfoAlignment) CXXDeductionGuideNameExtra

76 public llvm::FoldingSetNode {

79

80

82

83

84

85

86 void *FETokenInfo;

87

91

92public:

93 void Profile(llvm::FoldingSetNodeID &ID) { ID.AddPointer(Template); }

94};

95

96

97

98

99

103

104

106

107

108

109

110 void *FETokenInfo = nullptr;

111};

112

113

114

115class alignas(IdentifierInfoAlignment) CXXLiteralOperatorIdName

117 public llvm::FoldingSetNode {

120

122

123

124

125

126 void *FETokenInfo;

127

131

132public:

133 void Profile(llvm::FoldingSetNodeID &FSID) { FSID.AddPointer(ID); }

134};

135

136}

137

138

139

140

141

142

143

144class DeclarationName {

147

148

149

150

151

152

153

154

155

156

157

158

159

160

161

162

163

164

165

166

167

168

169

170

171

172

173

174 enum StoredNameKind {

175 StoredIdentifier = 0,

176 StoredObjCZeroArgSelector = Selector::ZeroArg,

177 StoredObjCOneArgSelector = Selector::OneArg,

178 StoredCXXConstructorName = 3,

179 StoredCXXDestructorName = 4,

180 StoredCXXConversionFunctionName = 5,

181 StoredCXXOperatorName = 6,

182 StoredDeclarationNameExtra = Selector::MultiArg,

183 PtrMask = 7,

184 UncommonNameKindOffset = 8

185 };

186

193 "The various classes that DeclarationName::Ptr can point to"

194 " must be at least aligned to 8 bytes!");

195

196 static_assert(

197 std::is_same<std::underlying_type_t,

198 std::underlying_type_t<

200 "The various enums used to compute values for NameKind should "

201 "all have the same underlying type");

202

203public:

204

205

206

207

217 UncommonNameKindOffset,

220 UncommonNameKindOffset,

223 llvm::addEnumValues(UncommonNameKindOffset,

226 llvm::addEnumValues(UncommonNameKindOffset,

228 };

229

230private:

231

232

233

234

235

236

237

238

239

240

241

242

243

244

245

246

247

248

249

250

251

252

253

254

255

256

257

258

259

260

261

262

264

265 StoredNameKind getStoredNameKind() const {

266 return static_cast<StoredNameKind>(Ptr & PtrMask);

267 }

268

269 void *getPtr() const { return reinterpret_cast<void *>(Ptr & ~PtrMask); }

270

271 void setPtrAndKind(const void *P, StoredNameKind Kind) {

273 assert((Kind & ~PtrMask) == 0 &&

274 "Invalid StoredNameKind in setPtrAndKind!");

275 assert((PAsInteger & PtrMask) == 0 &&

276 "Improperly aligned pointer in setPtrAndKind!");

277 Ptr = PAsInteger | Kind;

278 }

279

280

281 DeclarationName(detail::DeclarationNameExtra *Name) {

282 setPtrAndKind(Name, StoredDeclarationNameExtra);

283 }

284

285

286 DeclarationName(detail::CXXSpecialNameExtra *Name,

287 StoredNameKind StoredKind) {

288 assert((StoredKind == StoredCXXConstructorName ||

289 StoredKind == StoredCXXDestructorName ||

290 StoredKind == StoredCXXConversionFunctionName) &&

291 "Invalid StoredNameKind when constructing a DeclarationName"

292 " from a CXXSpecialNameExtra!");

293 setPtrAndKind(Name, StoredKind);

294 }

295

296

297 DeclarationName(detail::CXXOperatorIdName *Name) {

298 setPtrAndKind(Name, StoredCXXOperatorName);

299 }

300

301

302 IdentifierInfo *castAsIdentifierInfo() const {

303 assert((getStoredNameKind() == StoredIdentifier) &&

304 "DeclarationName does not store an IdentifierInfo!");

305 return static_cast<IdentifierInfo *>(getPtr());

306 }

307

308

309

310 detail::DeclarationNameExtra *castAsExtra() const {

311 assert((getStoredNameKind() == StoredDeclarationNameExtra) &&

312 "DeclarationName does not store an Extra structure!");

313 return static_cast<detail::DeclarationNameExtra *>(getPtr());

314 }

315

316

317

318 detail::CXXSpecialNameExtra *castAsCXXSpecialNameExtra() const {

319 assert((getStoredNameKind() == StoredCXXConstructorName ||

320 getStoredNameKind() == StoredCXXDestructorName ||

321 getStoredNameKind() == StoredCXXConversionFunctionName) &&

322 "DeclarationName does not store a CXXSpecialNameExtra!");

323 return static_cast<detail::CXXSpecialNameExtra *>(getPtr());

324 }

325

326

327

328 detail::CXXOperatorIdName *castAsCXXOperatorIdName() const {

329 assert((getStoredNameKind() == StoredCXXOperatorName) &&

330 "DeclarationName does not store a CXXOperatorIdName!");

331 return static_cast<detail::CXXOperatorIdName *>(getPtr());

332 }

333

334

335

336 detail::CXXDeductionGuideNameExtra *castAsCXXDeductionGuideNameExtra() const {

337 assert(getNameKind() == CXXDeductionGuideName &&

338 "DeclarationName does not store a CXXDeductionGuideNameExtra!");

339 return static_cast<detail::CXXDeductionGuideNameExtra *>(getPtr());

340 }

341

342

343

344 detail::CXXLiteralOperatorIdName *castAsCXXLiteralOperatorIdName() const {

345 assert(getNameKind() == CXXLiteralOperatorName &&

346 "DeclarationName does not store a CXXLiteralOperatorIdName!");

347 return static_cast<detail::CXXLiteralOperatorIdName *>(getPtr());

348 }

349

350

351

352 void *getFETokenInfoSlow() const;

353 void setFETokenInfoSlow(void *T);

354

355public:

356

358

359

361 setPtrAndKind(II, StoredIdentifier);

362 }

363

364

366 : Ptr(reinterpret_cast<uintptr_t>(Sel.InfoPtr.getOpaqueValue())) {}

367

368

370

373 return DeclarationName(&UDirExtra);

374 }

375

376

377 explicit operator bool() const {

378 return getPtr() || (getStoredNameKind() != StoredIdentifier);

379 }

380

381

382 bool isEmpty() const { return !*this; }

383

384

385 bool isIdentifier() const { return getStoredNameKind() == StoredIdentifier; }

387 return getStoredNameKind() == StoredObjCZeroArgSelector;

388 }

390 return getStoredNameKind() == StoredObjCOneArgSelector;

391 }

392

393

395

396

397 StoredNameKind StoredKind = getStoredNameKind();

398 if (StoredKind != StoredDeclarationNameExtra)

399 return static_cast<NameKind>(StoredKind);

400

401

402

403 unsigned ExtraKind = castAsExtra()->getKind();

404 return static_cast<NameKind>(UncommonNameKindOffset + ExtraKind);

405 }

406

407

408

409

410

411

412

413 bool isDependentName() const;

414

415

417

418

419

422 return castAsIdentifierInfo();

423 return nullptr;

424 }

425

426

428

429

430 void *getAsOpaquePtr() const { return reinterpret_cast<void *>(Ptr); }

431

432

434 DeclarationName N;

435 N.Ptr = reinterpret_cast<uintptr_t>(P);

436 return N;

437 }

438

439

440

442 DeclarationName N;

443 N.Ptr = P;

444 return N;

445 }

446

447

448

450 if (getStoredNameKind() == StoredCXXConstructorName ||

451 getStoredNameKind() == StoredCXXDestructorName ||

452 getStoredNameKind() == StoredCXXConversionFunctionName) {

453 assert(getPtr() && "getCXXNameType on a null DeclarationName!");

454 return castAsCXXSpecialNameExtra()->Type;

455 }

457 }

458

459

460

463 assert(getPtr() &&

464 "getCXXDeductionGuideTemplate on a null DeclarationName!");

465 return castAsCXXDeductionGuideNameExtra()->Template;

466 }

467 return nullptr;

468 }

469

470

471

473 if (getStoredNameKind() == StoredCXXOperatorName) {

474 assert(getPtr() && "getCXXOverloadedOperator on a null DeclarationName!");

475 return castAsCXXOperatorIdName()->Kind;

476 }

478 }

479

482 return false;

484 case OO_New:

485 case OO_Array_New:

486 return true;

487 default:

488 return false;

489 }

490 }

491

494 return false;

496 case OO_Delete:

497 case OO_Array_Delete:

498 return true;

499 default:

500 return false;

501 }

502 }

503

507

508

509

512 assert(getPtr() && "getCXXLiteralIdentifier on a null DeclarationName!");

513 return castAsCXXLiteralOperatorIdName()->ID;

514 }

515 return nullptr;

516 }

517

518

523 "Not a selector!");

525 }

526

527

528

529

531 assert(getPtr() && "getFETokenInfo on an empty DeclarationName!");

532 if (getStoredNameKind() == StoredIdentifier)

533 return castAsIdentifierInfo()->getFETokenInfo();

534 return getFETokenInfoSlow();

535 }

536

538 assert(getPtr() && "setFETokenInfo on an empty DeclarationName!");

539 if (getStoredNameKind() == StoredIdentifier)

540 castAsIdentifierInfo()->setFETokenInfo(T);

541 else

542 setFETokenInfoSlow(T);

543 }

544

545

546 friend bool operator==(DeclarationName LHS, DeclarationName RHS) {

547 return LHS.Ptr == RHS.Ptr;

548 }

549

550

551 friend bool operator!=(DeclarationName LHS, DeclarationName RHS) {

552 return LHS.Ptr != RHS.Ptr;

553 }

554

556 DeclarationName Name;

558 return Name;

559 }

560

562 DeclarationName Name;

564 return Name;

565 }

566

568

570

571 void dump() const;

572};

573

574raw_ostream &operator<<(raw_ostream &OS, DeclarationName N);

575

576

577

581

582

583

587

588

589

593

594

595

599

600

601

602

603

604

606

608

609

610

611

612 llvm::FoldingSetdetail::CXXSpecialNameExtra CXXConstructorNames;

613

614

615

616

617 llvm::FoldingSetdetail::CXXSpecialNameExtra CXXDestructorNames;

618

619

620

621

622

623 llvm::FoldingSetdetail::CXXSpecialNameExtra CXXConversionFunctionNames;

624

625

626

627

629

630

631

632

633

634 llvm::FoldingSetdetail::CXXLiteralOperatorIdName CXXLiteralOperatorNames;

635

636

637

638

639

640 llvm::FoldingSetdetail::CXXDeductionGuideNameExtra CXXDeductionGuideNames;

641

642public:

649

650

654

655

657

658

660

661

663

664

666

667

668

669

670

671

672

675

676

680

681

683};

684

685

686

687

689

690

691

692

693

694

695 struct NT {

697 };

698

699

700 struct CXXOpName {

703 };

704

705

706 struct CXXLitOpName {

708 };

709

710

711

712

713

714 union {

718 };

719

720 void setNamedTypeLoc(TypeSourceInfo *TInfo) { NamedType.TInfo = TInfo; }

721

722 void setCXXOperatorNameRange(SourceRange Range) {

723 CXXOperatorName.BeginOpNameLoc = Range.getBegin();

724 CXXOperatorName.EndOpNameLoc = Range.getEnd();

725 }

726

727 void setCXXLiteralOperatorNameLoc(SourceLocation Loc) {

728 CXXLiteralOperatorName.OpNameLoc = Loc;

729 }

730

731public:

732 DeclarationNameLoc(DeclarationName Name);

733

735

736

737

739

740

744

745

749

750

751

752

757

758

759

760

764

765

766

769 DNL.setNamedTypeLoc(TInfo);

770 return DNL;

771 }

772

773

778

779

782 DNL.setCXXOperatorNameRange(Range);

783 return DNL;

784 }

785

786

789 DNL.setCXXLiteralOperatorNameLoc(Loc);

790 return DNL;

791 }

792};

793

794

795

797private:

798

800

801

803

804

806

807public:

808

810

812 : Name(Name), NameLoc(NameLoc), LocInfo(Name) {}

813

816 : Name(Name), NameLoc(NameLoc), LocInfo(LocInfo) {}

817

818

820

821

823

824

826

827

829

832

833

834

839 return nullptr;

840 return LocInfo.getNamedTypeInfo();

841 }

842

843

844

851

852

853

857 return LocInfo.getCXXOperatorNameRange();

858 }

859

860

861

866

867

868

869

873 return LocInfo.getCXXLiteralOperatorNameLoc();

874 }

875

876

877

878

883

884

885 bool isInstantiationDependent() const;

886

887

888

889 bool containsUnexpandedParameterPack() const;

890

891

893

894

895 void printName(raw_ostream &OS, PrintingPolicy Policy) const;

896

897

899

900

904

909

910private:

912};

913

914

915

922

923raw_ostream &operator<<(raw_ostream &OS, DeclarationNameInfo DNInfo);

924

925}

926

927namespace llvm {

928

929

930

931template<>

932struct DenseMapInfo<clang::DeclarationName> {

936

940

942 return DenseMapInfo<void*>::getHashValue(Name.getAsOpaquePtr());

943 }

944

945 static inline bool

947 return LHS == RHS;

948 }

949};

950

960

961}

962

963

964

966

967

968

971

975

976public:

977

979};

980

981}

982

983#endif

Defines the Diagnostic-related interfaces.

static void dump(llvm::raw_ostream &OS, StringRef FunctionName, ArrayRef< CounterExpression > Expressions, ArrayRef< CounterMappingRegion > Regions)

Defines the clang::IdentifierInfo, clang::IdentifierTable, and clang::Selector interfaces.

static void print(llvm::raw_ostream &OS, const T &V, ASTContext &ASTCtx, QualType Ty)

Defines an enumeration for C++ overloaded operators.

Implements a partial diagnostic that can be emitted anwyhere in a DiagnosticBuilder stream.

static bool compare(const PathDiagnostic &X, const PathDiagnostic &Y)

Defines the clang::SourceLocation class and associated facilities.

C Language Family Type Representation.

__DEVICE__ void * memset(void *__a, int __b, size_t __c)

Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...

friend class ASTContext

Definition DeclarationName.h:970

DeclarationName getDeclName() const

Get the name of the template.

Definition DeclarationName.h:978

Represents a canonical, potentially-qualified type.

DeclarationNameLoc - Additional source/type location info for a declaration name.

Definition DeclarationName.h:688

static DeclarationNameLoc makeNamedTypeLoc(TypeSourceInfo *TInfo)

Construct location information for a constructor, destructor or conversion operator.

Definition DeclarationName.h:767

static DeclarationNameLoc makeCXXLiteralOperatorNameLoc(SourceLocation Loc)

Construct location information for a literal C++ operator.

Definition DeclarationName.h:787

SourceLocation getCXXLiteralOperatorNameLoc() const

Return the location of the literal operator name (without the operator keyword).

Definition DeclarationName.h:761

struct CXXLitOpName CXXLiteralOperatorName

Definition DeclarationName.h:717

SourceLocation getCXXOperatorNameBeginLoc() const

Return the beginning location of the getCXXOperatorNameRange() range.

Definition DeclarationName.h:741

DeclarationNameLoc()

Definition DeclarationName.h:734

TypeSourceInfo * getNamedTypeInfo() const

Returns the source type info.

Definition DeclarationName.h:738

static DeclarationNameLoc makeCXXOperatorNameLoc(SourceLocation BeginLoc, SourceLocation EndLoc)

Construct location information for a non-literal C++ operator.

Definition DeclarationName.h:774

DeclarationNameLoc(DeclarationName Name)

SourceLocation getCXXOperatorNameEndLoc() const

Return the end location of the getCXXOperatorNameRange() range.

Definition DeclarationName.h:746

struct NT NamedType

Definition DeclarationName.h:715

SourceRange getCXXOperatorNameRange() const

Return the range of the operator name (without the operator keyword).

Definition DeclarationName.h:753

static DeclarationNameLoc makeCXXOperatorNameLoc(SourceRange Range)

Construct location information for a non-literal C++ operator.

Definition DeclarationName.h:780

struct CXXOpName CXXOperatorName

Definition DeclarationName.h:716

The name of a declaration.

Definition DeclarationName.h:144

static DeclarationName getFromOpaqueInteger(uintptr_t P)

Get a declaration name from an opaque integer returned by getAsOpaqueInteger.

Definition DeclarationName.h:441

uintptr_t getAsOpaqueInteger() const

Get the representation of this declaration name as an opaque integer.

Definition DeclarationName.h:427

friend class NamedDecl

Definition DeclarationName.h:146

static int compare(DeclarationName LHS, DeclarationName RHS)

IdentifierInfo * getAsIdentifierInfo() const

Retrieve the IdentifierInfo * stored in this declaration name, or null if this declaration name isn't...

Definition DeclarationName.h:420

bool isAnyOperatorNewOrDelete() const

Definition DeclarationName.h:504

static DeclarationName getEmptyMarker()

Definition DeclarationName.h:555

static DeclarationName getFromOpaquePtr(void *P)

Get a declaration name from an opaque pointer returned by getAsOpaquePtr.

Definition DeclarationName.h:433

static DeclarationName getTombstoneMarker()

Definition DeclarationName.h:561

TemplateDecl * getCXXDeductionGuideTemplate() const

If this name is the name of a C++ deduction guide, return the template associated with that name.

Definition DeclarationName.h:461

DeclarationName(Selector Sel)

Construct a declaration name from an Objective-C selector.

Definition DeclarationName.h:365

void * getAsOpaquePtr() const

Get the representation of this declaration name as an opaque pointer.

Definition DeclarationName.h:430

const IdentifierInfo * getCXXLiteralIdentifier() const

If this name is the name of a literal operator, retrieve the identifier associated with it.

Definition DeclarationName.h:510

friend bool operator==(DeclarationName LHS, DeclarationName RHS)

Determine whether the specified names are identical.

Definition DeclarationName.h:546

static DeclarationName getUsingDirectiveName()

Returns the name for all C++ using-directives.

Definition DeclarationName.h:369

bool isAnyOperatorDelete() const

Definition DeclarationName.h:492

friend bool operator!=(DeclarationName LHS, DeclarationName RHS)

Determine whether the specified names are different.

Definition DeclarationName.h:551

OverloadedOperatorKind getCXXOverloadedOperator() const

If this name is the name of an overloadable operator in C++ (e.g., operator+), retrieve the kind of o...

Definition DeclarationName.h:472

bool isObjCZeroArgSelector() const

Definition DeclarationName.h:386

NameKind

The kind of the name stored in this DeclarationName.

Definition DeclarationName.h:208

@ Identifier

Definition DeclarationName.h:209

@ ObjCMultiArgSelector

Definition DeclarationName.h:225

@ CXXDestructorName

Definition DeclarationName.h:213

@ CXXConstructorName

Definition DeclarationName.h:212

@ CXXLiteralOperatorName

Definition DeclarationName.h:219

@ CXXUsingDirective

Definition DeclarationName.h:222

@ CXXDeductionGuideName

Definition DeclarationName.h:216

@ CXXOperatorName

Definition DeclarationName.h:215

@ ObjCOneArgSelector

Definition DeclarationName.h:211

@ CXXConversionFunctionName

Definition DeclarationName.h:214

@ ObjCZeroArgSelector

Definition DeclarationName.h:210

void * getFETokenInfo() const

Get and set FETokenInfo.

Definition DeclarationName.h:530

bool isAnyOperatorNew() const

Definition DeclarationName.h:480

QualType getCXXNameType() const

If this name is one of the C++ names (of a constructor, destructor, or conversion function),...

Definition DeclarationName.h:449

Selector getObjCSelector() const

Get the Objective-C selector stored in this declaration name.

Definition DeclarationName.h:519

bool isObjCOneArgSelector() const

Definition DeclarationName.h:389

DeclarationName()

Construct an empty declaration name.

Definition DeclarationName.h:357

friend class DeclarationNameTable

Definition DeclarationName.h:145

NameKind getNameKind() const

Determine what kind of name this is.

Definition DeclarationName.h:394

bool isEmpty() const

Evaluates true when this declaration name is empty.

Definition DeclarationName.h:382

DeclarationName(const IdentifierInfo *II)

Construct a declaration name from an IdentifierInfo *.

Definition DeclarationName.h:360

void setFETokenInfo(void *T)

Definition DeclarationName.h:537

bool isIdentifier() const

Predicate functions for querying what type of name this is.

Definition DeclarationName.h:385

@ ak_declarationname

DeclarationName.

One of these records is kept for each identifier that is lexed.

A (possibly-)qualified type.

Smart pointer class that efficiently represents Objective-C method names.

Encodes a location in the source.

bool isValid() const

Return true if this is a valid SourceLocation object.

A trivial tuple used to represent a source range.

The streaming interface shared between DiagnosticBuilder and PartialDiagnostic.

void AddTaggedVal(uint64_t V, DiagnosticsEngine::ArgumentKind Kind) const

The base class of all kinds of template declarations (e.g., class, function, etc.).

A container of type source information.

UncommonTemplateNameStorage(Kind Kind, unsigned Index, unsigned Data)

Contains the actual identifier that makes up the name of a C++ literal operator.

Definition DeclarationName.h:117

void Profile(llvm::FoldingSetNodeID &FSID)

Definition DeclarationName.h:133

Contains extra information for the name of an overloaded operator in C++, such as "operator+.

Definition DeclarationName.h:100

The JSON file list parser is used to communicate input to InstallAPI.

CanQual< Type > CanQualType

Represents a canonical, potentially-qualified type.

OverloadedOperatorKind

Enumeration specifying the different kinds of C++ overloaded operators.

@ OO_None

Not an overloaded operator.

@ NUM_OVERLOADED_OPERATORS

nullptr

This class represents a compute construct, representing a 'Kind' of ‘parallel’, 'serial',...

bool operator<(DeclarationName LHS, DeclarationName RHS)

Ordering on two declaration names.

Definition DeclarationName.h:578

const FunctionProtoType * T

bool operator<=(DeclarationName LHS, DeclarationName RHS)

Ordering on two declaration names.

Definition DeclarationName.h:590

bool operator>(DeclarationName LHS, DeclarationName RHS)

Ordering on two declaration names.

Definition DeclarationName.h:584

bool operator>=(DeclarationName LHS, DeclarationName RHS)

Ordering on two declaration names.

Definition DeclarationName.h:596

llvm::StringRef getAsString(SyncScope S)

const StreamingDiagnostic & operator<<(const StreamingDiagnostic &DB, const ConceptReference *C)

Insertion operator for diagnostics.

__UINTPTR_TYPE__ uintptr_t

An unsigned integer type with the property that any valid pointer to void can be converted to this ty...

SourceLocation getLoc() const

getLoc - Returns the main location of the declaration name.

Definition DeclarationName.h:825

DeclarationName getName() const

getName - Returns the embedded declaration name.

Definition DeclarationName.h:819

void setLoc(SourceLocation L)

setLoc - Sets the main location of the declaration name.

Definition DeclarationName.h:828

void setCXXLiteralOperatorNameLoc(SourceLocation Loc)

setCXXLiteralOperatorNameLoc - Sets the location of the literal operator name (not the operator keywo...

Definition DeclarationName.h:879

void setNamedTypeInfo(TypeSourceInfo *TInfo)

setNamedTypeInfo - Sets the source type info associated to the name.

Definition DeclarationName.h:845

void setInfo(const DeclarationNameLoc &Info)

Definition DeclarationName.h:831

void setCXXOperatorNameRange(SourceRange R)

setCXXOperatorNameRange - Sets the range of the operator name (without the operator keyword).

Definition DeclarationName.h:862

SourceRange getCXXOperatorNameRange() const

getCXXOperatorNameRange - Gets the range of the operator name (without the operator keyword).

Definition DeclarationName.h:854

DeclarationNameInfo(DeclarationName Name, SourceLocation NameLoc)

Definition DeclarationName.h:811

void setName(DeclarationName N)

setName - Sets the embedded declaration name.

Definition DeclarationName.h:822

const DeclarationNameLoc & getInfo() const

Definition DeclarationName.h:830

SourceLocation getBeginLoc() const

getBeginLoc - Retrieve the location of the first token.

Definition DeclarationName.h:898

TypeSourceInfo * getNamedTypeInfo() const

getNamedTypeInfo - Returns the source type info associated to the name.

Definition DeclarationName.h:835

SourceRange getSourceRange() const LLVM_READONLY

getSourceRange - The range of the declaration name.

Definition DeclarationName.h:901

DeclarationNameInfo(DeclarationName Name, SourceLocation NameLoc, DeclarationNameLoc LocInfo)

Definition DeclarationName.h:814

SourceLocation getCXXLiteralOperatorNameLoc() const

getCXXLiteralOperatorNameLoc - Returns the location of the literal operator name (not the operator ke...

Definition DeclarationName.h:870

SourceLocation getEndLoc() const LLVM_READONLY

Definition DeclarationName.h:905

DeclarationNameInfo()=default

Describes how types, statements, expressions, and declarations should be printed.

static clang::DeclarationName getEmptyKey()

Definition DeclarationName.h:933

static clang::DeclarationName getTombstoneKey()

Definition DeclarationName.h:937

static bool isEqual(clang::DeclarationName LHS, clang::DeclarationName RHS)

Definition DeclarationName.h:946

static unsigned getHashValue(clang::DeclarationName Name)

Definition DeclarationName.h:941

static constexpr int NumLowBitsAvailable

Definition DeclarationName.h:958

static void * getAsVoidPointer(clang::DeclarationName P)

Definition DeclarationName.h:952

static clang::DeclarationName getFromVoidPointer(void *P)

Definition DeclarationName.h:955