Add SourceManagerForFile helper which sets up SourceManager and dependencies for...
authorEric Liu <ioeric@google.com>
Wed, 9 May 2018 21:35:52 +0000 (21:35 +0000)
committerEric Liu <ioeric@google.com>
Wed, 9 May 2018 21:35:52 +0000 (21:35 +0000)
commit2e538089fa3761a44cab65c640e93fb8b399f9a0
treec451824c176061b166b2e92e814d95b201a3d1ef
parent1608ca6d644783f24e852448422d0f3a14ff4011
Add SourceManagerForFile helper which sets up SourceManager and dependencies for a single file with code snippet

Summary: This can be used to create a virtual environment (incl. VFS, source manager) for code snippets.

Reviewers: sammccall, klimek

Reviewed By: sammccall

Subscribers: klimek, mgorny, cfe-commits

Differential Revision: https://reviews.llvm.org/D46176

llvm-svn: 331923
clang/include/clang/Basic/SourceManager.h
clang/lib/Basic/SourceManager.cpp
clang/lib/Format/Format.cpp
clang/lib/Format/SortJavaScriptImports.cpp
clang/lib/Format/TokenAnalyzer.cpp
clang/lib/Format/TokenAnalyzer.h