;
22llvm::stable_sort(Decls,
35 "Occurrences should be associated with their canonical decl");
37Decls.emplace_back(Roles, Offset,
D, Relations);
44Decls.emplace_back(Roles, Offset, Name, MI);
49 if(
const auto*MI =
D.DeclOrMacro.dyn_cast<
const MacroInfo*>())
50 returnMI->isUsedForHeaderGuard();
56OS <<
"DECLS BEGIN ---\n";
57 for(
auto&DclInfo : Decls) {
58 if(
const auto*
D= dyn_cast<const Decl *>(DclInfo.DeclOrMacro)) {
61OS << llvm::sys::path::filename(PLoc.
getFilename()) <<
':' 64 if(
const auto*ND = dyn_cast<NamedDecl>(
D)) {
65OS <<
' '<< ND->getDeclName();
68 const auto*MI = cast<const MacroInfo *>(DclInfo.DeclOrMacro);
71OS << llvm::sys::path::filename(PLoc.
getFilename()) <<
':' 73OS <<
' '<< DclInfo.MacroName->getName();
78OS <<
"DECLS END ---\n";
Defines the clang::ASTContext interface.
Defines the C++ template declaration subclasses.
Defines the SourceManager interface.
Decl - This represents one declaration (or definition), e.g.
bool isCanonicalDecl() const
Whether this particular Decl is a canonical one.
SourceLocation getLocation() const
One of these records is kept for each identifier that is lexed.
Encapsulates the data about a macro definition (e.g.
Represents an unpacked "presumed" location which can be presented to the user.
unsigned getColumn() const
Return the presumed column number of this location.
const char * getFilename() const
Return the presumed filename of this location.
unsigned getLine() const
Return the presumed line number of this location.
Encodes a location in the source.
This class handles loading and caching of source files into memory.
void print(llvm::raw_ostream &OS, SourceManager &SM) const
ArrayRef< DeclOccurrence > getDeclOccurrencesSortedByOffset() const
void addMacroOccurence(SymbolRoleSet Roles, unsigned Offset, const IdentifierInfo *Name, const MacroInfo *MI)
Adds an occurrence of the given macro at the supplied Offset.
void addDeclOccurence(SymbolRoleSet Roles, unsigned Offset, const Decl *D, ArrayRef< SymbolRelation > Relations)
Adds an occurrence of the canonical declaration D at the supplied Offset.
void removeHeaderGuardMacros()
Remove any macro occurrences for header guards.
The JSON file list parser is used to communicate input to InstallAPI.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4