Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:36:54

0001 //===- ExtractAPI/TypedefUnderlyingTypeResolver.h ---------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 ///
0009 /// \file
0010 /// This file defines the UnderlyingTypeResolver which is a helper type for
0011 /// resolving the undelrying type for a given QualType and exposing that
0012 /// information in various forms.
0013 ///
0014 //===----------------------------------------------------------------------===//
0015 
0016 #ifndef LLVM_CLANG_UNDERLYING_TYPE_RESOLVER_H
0017 #define LLVM_CLANG_UNDERLYING_TYPE_RESOLVER_H
0018 
0019 #include "clang/AST/ASTContext.h"
0020 #include "clang/AST/Decl.h"
0021 #include "clang/ExtractAPI/API.h"
0022 
0023 #include <string>
0024 
0025 namespace clang {
0026 namespace extractapi {
0027 
0028 struct TypedefUnderlyingTypeResolver {
0029   /// Gets the underlying type declaration.
0030   const NamedDecl *getUnderlyingTypeDecl(QualType Type) const;
0031 
0032   /// Get a SymbolReference for the given type.
0033   SymbolReference getSymbolReferenceForType(QualType Type, APISet &API) const;
0034 
0035   /// Get a USR for the given type.
0036   std::string getUSRForType(QualType Type) const;
0037 
0038   explicit TypedefUnderlyingTypeResolver(ASTContext &Context)
0039       : Context(Context) {}
0040 
0041 private:
0042   ASTContext &Context;
0043 };
0044 
0045 } // namespace extractapi
0046 } // namespace clang
0047 
0048 #endif // LLVM_CLANG_UNDERLYING_TYPE_RESOLVER_H