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

Method getGlobalEndOffset

lib/inputanalysis/DefMapGenerator.cpp:266–279  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

264}
265
266unsigned
267DefMapGenerator::getGlobalEndOffset(const VarDecl &D,
268 const SourceManager &SrcManager) const {
269 auto Loc = SrcManager.getTopMacroCallerLoc(D.getBeginLoc());
270 auto FileID = SrcManager.getFileID(Loc);
271 auto EndLoc = SrcManager.getLocForEndOfFile(FileID);
272 if (EndLoc.isInvalid()) {
273 Loc = SrcManager.getSpellingLoc(D.getBeginLoc());
274 FileID = SrcManager.getFileID(Loc);
275 EndLoc = SrcManager.getLocForEndOfFile(FileID);
276 assert(EndLoc.isValid() && "Unexpected Program State");
277 }
278 return SrcManager.getFileOffset(EndLoc);
279}
280
281unsigned
282DefMapGenerator::getNonGlobalEndOffset(const VarDecl &D,

Callers

nothing calls this directly

Calls 2

getBeginLocMethod · 0.80
isValidMethod · 0.80

Tested by

no test coverage detected