[cfe-commits] r155198 - /cfe/trunk/unittests/Tooling/RecursiveASTVisitorTest.cpp

Manuel Klimek klimek at google.com
Fri Apr 20 07:07:01 PDT 2012


Author: klimek
Date: Fri Apr 20 09:07:01 2012
New Revision: 155198

URL: http://llvm.org/viewvc/llvm-project?rev=155198&view=rev
Log:
No need to put the SourceManager in with the ASTContext, as the ASTContext
already contains the SourceManager.


Modified:
    cfe/trunk/unittests/Tooling/RecursiveASTVisitorTest.cpp

Modified: cfe/trunk/unittests/Tooling/RecursiveASTVisitorTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Tooling/RecursiveASTVisitorTest.cpp?rev=155198&r1=155197&r2=155198&view=diff
==============================================================================
--- cfe/trunk/unittests/Tooling/RecursiveASTVisitorTest.cpp (original)
+++ cfe/trunk/unittests/Tooling/RecursiveASTVisitorTest.cpp Fri Apr 20 09:07:01 2012
@@ -38,7 +38,6 @@
 
 protected:
   clang::ASTContext *Context;
-  clang::SourceManager *SM;
 
 private:
   class FindConsumer : public clang::ASTConsumer {
@@ -59,7 +58,6 @@
 
     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 @@
       // 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());
     }
   }
 





More information about the cfe-commits mailing list