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

Method getNonGlobalEndOffset

lib/inputanalysis/DefMapGenerator.cpp:281–295  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

279}
280
281unsigned
282DefMapGenerator::getNonGlobalEndOffset(const VarDecl &D,
283 const SourceManager &SrcManager) const {
284 const auto *DC = D.getDeclContext();
285 assert(DC && "Unexpected Program State");
286
287 DeclStmtFinder Finder(D);
288 Finder.TraverseDecl(Decl::castFromDeclContext(DC));
289 assert(Finder.Result && "Unexpected Program State");
290
291 auto EndLoc = SrcManager.getTopMacroCallerLoc(Finder.Result->getEndLoc());
292 auto Offset = SrcManager.getFileOffset(EndLoc);
293 return Offset +
294 Lexer::MeasureTokenLength(EndLoc, SrcManager, clang::LangOptions());
295}
296
297const Decl *
298DefMapGenerator::getFirstVarDeclhasSameBeginLoc(const VarDecl &D) const {

Callers

nothing calls this directly

Calls 1

getEndLocMethod · 0.80

Tested by

no test coverage detected