sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.


================
Comment at: include/clang/Basic/SourceManager.h:1819
+/// SourceManager and necessary depdencies (e.g. VFS, FileManager) for a single
+/// file.
+class SourceManagerForFile {
----------------
nit: single in-memory file


================
Comment at: include/clang/Basic/SourceManager.h:1824
+  /// The main file in the SourceManager will be \p FileName with \p Content.
+  static std::unique_ptr<SourceManagerForFile> create(StringRef FileName,
+                                                      StringRef Content);
----------------
why is this not just a constructor? it looks like it can't fail?


================
Comment at: include/clang/Basic/SourceManager.h:1827
+
+  SourceManager &getSourceManager() { return SourceMgr; }
+
----------------
this could also just be `get()` or `operator*`


================
Comment at: lib/Format/TokenAnalyzer.h:71
 private:
+  std::unique_ptr<SourceManagerForFile> VirtualSM;
+
----------------
add a comment that this is only present if constructed from a string?


Repository:
  rC Clang

https://reviews.llvm.org/D46176



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to