[PATCH] D28180: Fixing small errors in libAST Matcher Tutorial.
Mads Ravn via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 30 13:00:32 PST 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL290766: [clang] Minor fix to libASTMatcherTutorial (authored by madsravn).
Changed prior to commit:
https://reviews.llvm.org/D28180?vs=82735&id=82742#toc
Repository:
rL LLVM
https://reviews.llvm.org/D28180
Files:
cfe/trunk/docs/LibASTMatchersTutorial.rst
Index: cfe/trunk/docs/LibASTMatchersTutorial.rst
===================================================================
--- cfe/trunk/docs/LibASTMatchersTutorial.rst
+++ cfe/trunk/docs/LibASTMatchersTutorial.rst
@@ -496,9 +496,9 @@
void LoopPrinter::run(const MatchFinder::MatchResult &Result) {
ASTContext *Context = Result.Context;
- const ForStmt *FS = Result.Nodes.getStmtAs<ForStmt>("forLoop");
+ const ForStmt *FS = Result.Nodes.getNodeAs<ForStmt>("forLoop");
// We do not want to convert header files!
- if (!FS || !Context->getSourceManager().isFromMainFile(FS->getForLoc()))
+ if (!FS || !Context->getSourceManager().isWrittenInMainFile(FS->getForLoc()))
return;
const VarDecl *IncVar = Result.Nodes.getNodeAs<VarDecl>("incVarName");
const VarDecl *CondVar = Result.Nodes.getNodeAs<VarDecl>("condVarName");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28180.82742.patch
Type: text/x-patch
Size: 897 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161230/f546ba0c/attachment.bin>
More information about the cfe-commits
mailing list