[PATCH] D12407: [clang-format-vs] Add an option to reformat source code when file is saved to disk

Beren Minor via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 6 07:40:04 PST 2015


berenm added inline comments.

================
Comment at: tools/clang-format-vs/ClangFormat/ClangFormatPackage.cs:86
@@ -69,1 +85,3 @@
 
+            IComponentModel componentModel = GetService(typeof(SComponentModel)) as IComponentModel;
+            editorAdaptersFactoryService = componentModel.GetService<IVsEditorAdaptersFactoryService>();
----------------
I did more tests on my side, and apparently this line does not work on VS2012, componentModel is null. I don't know at all why and how to fix it, and it works fine starting with VS2013.


http://reviews.llvm.org/D12407





More information about the cfe-commits mailing list