aboutsummaryrefslogtreecommitdiff
path: root/unittests/Tooling/RecursiveASTVisitorTest.cpp
diff options
context:
space:
mode:
authorManuel Klimek <klimek@google.com>2012-04-20 14:07:01 +0000
committerManuel Klimek <klimek@google.com>2012-04-20 14:07:01 +0000
commitdab28942c4ebd04e279535207c366faedea260a6 (patch)
treede7589cc3eeb9ae27f3f6bfbacff7664f783f211 /unittests/Tooling/RecursiveASTVisitorTest.cpp
parent700c508fd469a971480c36d54ae12fe9011f27c0 (diff)
No need to put the SourceManager in with the ASTContext, as the ASTContext
already contains the SourceManager. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155198 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Tooling/RecursiveASTVisitorTest.cpp')
-rw-r--r--unittests/Tooling/RecursiveASTVisitorTest.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/unittests/Tooling/RecursiveASTVisitorTest.cpp b/unittests/Tooling/RecursiveASTVisitorTest.cpp
index d749f76a22..d7dad2738a 100644
--- a/unittests/Tooling/RecursiveASTVisitorTest.cpp
+++ b/unittests/Tooling/RecursiveASTVisitorTest.cpp
@@ -38,7 +38,6 @@ public:
protected:
clang::ASTContext *Context;
- clang::SourceManager *SM;
private:
class FindConsumer : public clang::ASTConsumer {
@@ -59,7 +58,6 @@ private:
virtual clang::ASTConsumer* CreateASTConsumer(
clang::CompilerInstance& compiler, llvm::StringRef dummy) {
- Visitor->SM = &compiler.getSourceManager();
Visitor->Context = &compiler.getASTContext();
/// TestConsumer will be deleted by the framework calling us.
return new FindConsumer(Visitor);
@@ -116,7 +114,7 @@ protected:
// If we did not match, record information about partial matches.
llvm::raw_string_ostream Stream(PartialMatches);
Stream << ", partial match: \"" << Name << "\" at ";
- Location.print(Stream, *this->SM);
+ Location.print(Stream, this->Context->getSourceManager());
}
}