Clean the project (#57)

This commit is contained in:
ykiko
2025-02-05 14:10:11 +08:00
committed by GitHub
parent 9b98354918
commit 2f9622bca7
71 changed files with 1521 additions and 742 deletions

23
include/AST/Utility.h Normal file
View File

@@ -0,0 +1,23 @@
#include "clang/AST/Decl.h"
namespace clice {
/// is this decl a definition?
bool isDefinition(const clang::Decl* decl);
/// Return the decl where it is instantiated from. If could be a template decl
/// or a member of a class template. If the decl is a full specialization, return
/// itself.
const clang::NamedDecl* instantiatedFrom(const clang::NamedDecl* decl);
/// To response go-to-type-definition request. Some decls actually have a type
/// for example the result of `typeof(var)` is the type of `var`. This function
/// returns the type for the decl if any.
clang::QualType typeForDecl(const clang::NamedDecl* decl);
/// Get the underlying decl for a type if any.
const clang::NamedDecl* declForType(clang::QualType type);
void dumpInclude(clang::SourceManager& srcMgr, clang::SourceLocation loc);
} // namespace clice