MCPcopy Create free account
hub / github.com/Samsung/UTopia / getMacroFunctionExpansionRange

Function getMacroFunctionExpansionRange

lib/utils/ASTUtil.cpp:112–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110}
111
112clang::CharSourceRange
113getMacroFunctionExpansionRange(const clang::SourceManager &SrcManager,
114 const SourceLocation &Loc) {
115 auto FI = SrcManager.getFileID(Loc);
116 if (FI.isInvalid())
117 return clang::CharSourceRange();
118
119 bool Validity = true;
120 const auto &SLE = SrcManager.getSLocEntry(FI, &Validity);
121 if (!Validity || !SLE.isExpansion())
122 return clang::CharSourceRange();
123
124 const auto &ExpInfo = SLE.getExpansion();
125 if (!ExpInfo.isFunctionMacroExpansion())
126 return clang::CharSourceRange();
127 return ExpInfo.getExpansionLocRange();
128}
129
130SourceLocation getTopMacroCallerLoc(const DynTypedNode &Node,
131 const SourceManager &SrcManager) {

Callers 3

getEndLocMethod · 0.85
TEST_FFunction · 0.85

Calls

no outgoing calls

Tested by 1

TEST_FFunction · 0.68