[PATCH] Fix for combined loop and nullptr convert tests

Edwin Vane edwin.vane at intel.com
Wed Feb 6 05:39:11 PST 2013

Comment at: cpp11-migrate/Transform.h:82
@@ -80,2 +81,3 @@
       Sources(Diagnostics, Files),
-      Rewrite(Sources, DefaultLangOptions) {}
+      Rewrite(Sources, DefaultLangOptions) {
I don't know why this didn't occur to me in our internal review but instead of recreating a SourceManager and re-overriding all the file contents, we should instead pass a SourceManager to this constructor. That is, pass in the SourceManager that comes from the RefactoringTool used by the caller. We don't have to worry about lifetime since the RefactoringTool will exist at least as long as the RewriteContainer. This constructor and class can be simplified somewhat since we then wouldn't need the DiagnosticsEngine.


More information about the cfe-commits mailing list