r266319 - clang-format: Allow include of clangFormat.h in managed context
Marianne Mailhot-Sarrasin via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 14 07:47:38 PDT 2016
Author: mamai
Date: Thu Apr 14 09:47:37 2016
New Revision: 266319
URL: http://llvm.org/viewvc/llvm-project?rev=266319&view=rev
Log:
clang-format: Allow include of clangFormat.h in managed context
Including VirtualFileSystem.h in the clangFormat.h indirectly includes <atomic>.
This header is blocked when compiling with /clr.
Patch by Maxime Beaulieu
Differential Revision: http://reviews.llvm.org/D19064
Modified:
cfe/trunk/include/clang/Format/Format.h
cfe/trunk/lib/Format/Format.cpp
Modified: cfe/trunk/include/clang/Format/Format.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Format/Format.h?rev=266319&r1=266318&r2=266319&view=diff
==============================================================================
--- cfe/trunk/include/clang/Format/Format.h (original)
+++ cfe/trunk/include/clang/Format/Format.h Thu Apr 14 09:47:37 2016
@@ -16,7 +16,6 @@
#define LLVM_CLANG_FORMAT_FORMAT_H
#include "clang/Basic/LangOptions.h"
-#include "clang/Basic/VirtualFileSystem.h"
#include "clang/Tooling/Core/Replacement.h"
#include "llvm/ADT/ArrayRef.h"
#include <system_error>
@@ -27,6 +26,10 @@ class Lexer;
class SourceManager;
class DiagnosticConsumer;
+namespace vfs {
+class FileSystem;
+}
+
namespace format {
enum class ParseError { Success = 0, Error, Unsuitable };
Modified: cfe/trunk/lib/Format/Format.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/Format.cpp?rev=266319&r1=266318&r2=266319&view=diff
==============================================================================
--- cfe/trunk/lib/Format/Format.cpp (original)
+++ cfe/trunk/lib/Format/Format.cpp Thu Apr 14 09:47:37 2016
@@ -22,6 +22,7 @@
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/DiagnosticOptions.h"
#include "clang/Basic/SourceManager.h"
+#include "clang/Basic/VirtualFileSystem.h"
#include "clang/Lex/Lexer.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/Allocator.h"
More information about the cfe-commits
mailing list