diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:04:05 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:04:05 +0000 |
| commit | 676fbe8105eeb6ff4bb2ed261cb212fcfdbe7b63 (patch) | |
| tree | 02a1ac369cb734d0abfa5000dd86e5b7797e6a74 /docs/RAVFrontendAction.rst | |
| parent | c7e70c433efc6953dc3888b9fbf9f3512d7da2b0 (diff) | |
Notes
Diffstat (limited to 'docs/RAVFrontendAction.rst')
| -rw-r--r-- | docs/RAVFrontendAction.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/RAVFrontendAction.rst b/docs/RAVFrontendAction.rst index c37d3c0e812e..dea23733bc48 100644 --- a/docs/RAVFrontendAction.rst +++ b/docs/RAVFrontendAction.rst @@ -128,7 +128,7 @@ locations: if (Declaration->getQualifiedNameAsString() == "n::m::C") { // getFullLoc uses the ASTContext's SourceManager to resolve the source // location and break it up into its line and column parts. - FullSourceLoc FullLocation = Context->getFullLoc(Declaration->getLocStart()); + FullSourceLoc FullLocation = Context->getFullLoc(Declaration->getBeginLoc()); if (FullLocation.isValid()) llvm::outs() << "Found declaration at " << FullLocation.getSpellingLineNumber() << ":" @@ -160,7 +160,7 @@ Now we can combine all of the above into a small example program: bool VisitCXXRecordDecl(CXXRecordDecl *Declaration) { if (Declaration->getQualifiedNameAsString() == "n::m::C") { - FullSourceLoc FullLocation = Context->getFullLoc(Declaration->getLocStart()); + FullSourceLoc FullLocation = Context->getFullLoc(Declaration->getBeginLoc()); if (FullLocation.isValid()) llvm::outs() << "Found declaration at " << FullLocation.getSpellingLineNumber() << ":" |
