[clang] [llvm] Delete the clang-format Visual Studio plugin code (PR #108342)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 12 00:57:50 PDT 2024
https://github.com/zmodem created https://github.com/llvm/llvm-project/pull/108342
This was obsoleted by Visual Studio providing built-in support for running clang-format in VS2017.
We haven't shipped it for years (since 10d2195305ac49605f2b7b6a25a4076c31923191), never got it working with VS2019, and never even tried with VS2022.
It's time to retire the code.
>From 9153796fa6cd7f18bd7395ec667a41d0598ac7a3 Mon Sep 17 00:00:00 2001
From: Hans Wennborg <hans at chromium.org>
Date: Thu, 12 Sep 2024 09:43:09 +0200
Subject: [PATCH 1/3] remove reference in build_llvm_release.bat
---
llvm/utils/release/build_llvm_release.bat | 1 -
1 file changed, 1 deletion(-)
diff --git a/llvm/utils/release/build_llvm_release.bat b/llvm/utils/release/build_llvm_release.bat
index 3508748c1d5404..dd041d7d384ec4 100755
--- a/llvm/utils/release/build_llvm_release.bat
+++ b/llvm/utils/release/build_llvm_release.bat
@@ -80,7 +80,6 @@ REM Prerequisites:
REM
REM Visual Studio 2019, CMake, Ninja, GNUWin32, SWIG, Python 3,
REM NSIS with the strlen_8192 patch,
-REM Visual Studio 2019 SDK and Nuget (for the clang-format plugin),
REM Perl (for the OpenMP run-time).
REM
REM
>From 1ce159849a2ab508b90a3ca200e894bcacb030a1 Mon Sep 17 00:00:00 2001
From: Hans Wennborg <hans at chromium.org>
Date: Thu, 12 Sep 2024 09:43:50 +0200
Subject: [PATCH 2/3] remove the clang-format-vs dir
---
clang/tools/clang-format-vs/.gitignore | 11 -
clang/tools/clang-format-vs/CMakeLists.txt | 33 --
clang/tools/clang-format-vs/ClangFormat.sln | 22 -
.../ClangFormat/ClangFormat.csproj | 261 ----------
.../ClangFormat/ClangFormat.vsct | 127 -----
.../ClangFormat/ClangFormatPackage.cs | 464 ------------------
.../ClangFormat/GlobalSuppressions.cs | 11 -
.../clang-format-vs/ClangFormat/Guids.cs | 12 -
.../clang-format-vs/ClangFormat/PkgCmdID.cs | 8 -
.../ClangFormat/Properties/AssemblyInfo.cs | 33 --
.../ClangFormat/Resources.Designer.cs | 63 ---
.../ClangFormat/Resources.resx | 129 -----
.../ClangFormat/Resources/Images_32bit.bmp | Bin 5176 -> 0 bytes
.../ClangFormat/Resources/Package.ico | Bin 1078 -> 0 bytes
.../RunningDocTableEventsDispatcher.cs | 79 ---
.../ClangFormat/VSPackage.resx | 140 ------
.../tools/clang-format-vs/ClangFormat/Vsix.cs | 96 ----
.../clang-format-vs/ClangFormat/license.txt | 261 ----------
.../ClangFormat/packages.config | 21 -
clang/tools/clang-format-vs/README.txt | 51 --
.../source.extension.vsixmanifest.in | 19 -
21 files changed, 1841 deletions(-)
delete mode 100644 clang/tools/clang-format-vs/.gitignore
delete mode 100644 clang/tools/clang-format-vs/CMakeLists.txt
delete mode 100644 clang/tools/clang-format-vs/ClangFormat.sln
delete mode 100644 clang/tools/clang-format-vs/ClangFormat/ClangFormat.csproj
delete mode 100644 clang/tools/clang-format-vs/ClangFormat/ClangFormat.vsct
delete mode 100644 clang/tools/clang-format-vs/ClangFormat/ClangFormatPackage.cs
delete mode 100644 clang/tools/clang-format-vs/ClangFormat/GlobalSuppressions.cs
delete mode 100644 clang/tools/clang-format-vs/ClangFormat/Guids.cs
delete mode 100644 clang/tools/clang-format-vs/ClangFormat/PkgCmdID.cs
delete mode 100644 clang/tools/clang-format-vs/ClangFormat/Properties/AssemblyInfo.cs
delete mode 100644 clang/tools/clang-format-vs/ClangFormat/Resources.Designer.cs
delete mode 100644 clang/tools/clang-format-vs/ClangFormat/Resources.resx
delete mode 100644 clang/tools/clang-format-vs/ClangFormat/Resources/Images_32bit.bmp
delete mode 100644 clang/tools/clang-format-vs/ClangFormat/Resources/Package.ico
delete mode 100644 clang/tools/clang-format-vs/ClangFormat/RunningDocTableEventsDispatcher.cs
delete mode 100644 clang/tools/clang-format-vs/ClangFormat/VSPackage.resx
delete mode 100644 clang/tools/clang-format-vs/ClangFormat/Vsix.cs
delete mode 100644 clang/tools/clang-format-vs/ClangFormat/license.txt
delete mode 100644 clang/tools/clang-format-vs/ClangFormat/packages.config
delete mode 100644 clang/tools/clang-format-vs/README.txt
delete mode 100644 clang/tools/clang-format-vs/source.extension.vsixmanifest.in
diff --git a/clang/tools/clang-format-vs/.gitignore b/clang/tools/clang-format-vs/.gitignore
deleted file mode 100644
index 270d840cb6d1a8..00000000000000
--- a/clang/tools/clang-format-vs/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-# Visual Studio files
-.vs/
-*.user
-/packages/
-/ClangFormat/obj/
-/ClangFormat/bin/
-
-# Generated and copied files
-/ClangFormat/Key.snk
-/ClangFormat/clang-format.exe
-/ClangFormat/source.extension.vsixmanifest
diff --git a/clang/tools/clang-format-vs/CMakeLists.txt b/clang/tools/clang-format-vs/CMakeLists.txt
deleted file mode 100644
index 1d44a47a3137be..00000000000000
--- a/clang/tools/clang-format-vs/CMakeLists.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-option(BUILD_CLANG_FORMAT_VS_PLUGIN "Build clang-format VS plugin" OFF)
-if (BUILD_CLANG_FORMAT_VS_PLUGIN)
- add_custom_target(clang_format_exe_for_vsix
- ${CMAKE_COMMAND} -E copy_if_different
- "${LLVM_TOOLS_BINARY_DIR}/clang-format.exe"
- "${CMAKE_CURRENT_SOURCE_DIR}/ClangFormat/clang-format.exe"
- DEPENDS clang-format)
-
- # Build number added to Clang version to ensure that new VSIX can be upgraded
- string(TIMESTAMP CLANG_FORMAT_VSIX_BUILD %y%m%d%H%M UTC)
-
- if (NOT CLANG_FORMAT_VS_VERSION)
- set(CLANG_FORMAT_VS_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}.${CLANG_FORMAT_VSIX_BUILD}")
- endif()
-
- configure_file("source.extension.vsixmanifest.in"
- "${CMAKE_CURRENT_SOURCE_DIR}/ClangFormat/source.extension.vsixmanifest")
-
- find_program(NUGET_EXE nuget PATHS ${NUGET_EXE_DIR})
- if (NOT NUGET_EXE)
- message(FATAL_ERROR "Could not find nuget.exe. Download from https://www.nuget.org/nuget.exe"
- " and add parent directory to PATH or pass it via NUGET_EXE_DIR var.")
- endif()
-
- add_custom_target(clang_format_vsix ALL
- COMMAND ${NUGET_EXE} restore "${CMAKE_CURRENT_SOURCE_DIR}/ClangFormat.sln"
- COMMAND devenv "${CMAKE_CURRENT_SOURCE_DIR}/ClangFormat.sln" /Build Release
- DEPENDS clang_format_exe_for_vsix "${CMAKE_CURRENT_SOURCE_DIR}/ClangFormat/source.extension.vsixmanifest"
- COMMAND ${CMAKE_COMMAND} -E copy_if_different
- "${CMAKE_CURRENT_SOURCE_DIR}/ClangFormat/bin/Release/ClangFormat.vsix"
- "${LLVM_TOOLS_BINARY_DIR}/ClangFormat.vsix"
- DEPENDS clang_format_exe_for_vsix)
-endif()
diff --git a/clang/tools/clang-format-vs/ClangFormat.sln b/clang/tools/clang-format-vs/ClangFormat.sln
deleted file mode 100644
index 46d742bce3f0b6..00000000000000
--- a/clang/tools/clang-format-vs/ClangFormat.sln
+++ /dev/null
@@ -1,22 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26228.12
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClangFormat", "ClangFormat\ClangFormat.csproj", "{7FD1783E-2D31-4D05-BF23-6EBE1B42B608}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {7FD1783E-2D31-4D05-BF23-6EBE1B42B608}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7FD1783E-2D31-4D05-BF23-6EBE1B42B608}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7FD1783E-2D31-4D05-BF23-6EBE1B42B608}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7FD1783E-2D31-4D05-BF23-6EBE1B42B608}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/clang/tools/clang-format-vs/ClangFormat/ClangFormat.csproj b/clang/tools/clang-format-vs/ClangFormat/ClangFormat.csproj
deleted file mode 100644
index e5b7ec008a1ac0..00000000000000
--- a/clang/tools/clang-format-vs/ClangFormat/ClangFormat.csproj
+++ /dev/null
@@ -1,261 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
- <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{7FD1783E-2D31-4D05-BF23-6EBE1B42B608}</ProjectGuid>
- <ProjectTypeGuids>{82b43b9b-a64c-4715-b499-d71e9ca2bd60};{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>LLVM.ClangFormat</RootNamespace>
- <AssemblyName>ClangFormat</AssemblyName>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>Key.snk</AssemblyOriginatorKeyFile>
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
- <MinimumVisualStudioVersion>15.0</MinimumVisualStudioVersion>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- <OldToolsVersion>4.0</OldToolsVersion>
- <PublishUrl>publish\</PublishUrl>
- <Install>true</Install>
- <InstallFrom>Disk</InstallFrom>
- <UpdateEnabled>false</UpdateEnabled>
- <UpdateMode>Foreground</UpdateMode>
- <UpdateInterval>7</UpdateInterval>
- <UpdateIntervalUnits>Days</UpdateIntervalUnits>
- <UpdatePeriodically>false</UpdatePeriodically>
- <UpdateRequired>false</UpdateRequired>
- <MapFileExtensions>true</MapFileExtensions>
- <ApplicationRevision>0</ApplicationRevision>
- <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
- <IsWebBootstrapper>false</IsWebBootstrapper>
- <UseApplicationTrust>false</UseApplicationTrust>
- <BootstrapperEnabled>true</BootstrapperEnabled>
- <TargetFrameworkProfile />
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <Prefer32Bit>false</Prefer32Bit>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <RunCodeAnalysis>true</RunCodeAnalysis>
- <Prefer32Bit>false</Prefer32Bit>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="envdte, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <EmbedInteropTypes>True</EmbedInteropTypes>
- </Reference>
- <Reference Include="envdte80, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <EmbedInteropTypes>True</EmbedInteropTypes>
- </Reference>
- <Reference Include="Microsoft.CSharp" />
- <Reference Include="Microsoft.VisualStudio.CoreUtility, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <HintPath>..\packages\VSSDK.CoreUtility.10.0.4\lib\net40\Microsoft.VisualStudio.CoreUtility.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.Editor, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <HintPath>..\packages\VSSDK.Editor.10.0.4\lib\net40\Microsoft.VisualStudio.Editor.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.OLE.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <HintPath>..\packages\VSSDK.OLE.Interop.7.0.4\lib\net20\Microsoft.VisualStudio.OLE.Interop.dll</HintPath>
- <Private>True</Private>
- <Private>False</Private>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.Shell.10.0, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <HintPath>..\packages\VSSDK.Shell.10.10.0.3\lib\net40\Microsoft.VisualStudio.Shell.10.0.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.Shell.Immutable.10.0, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <HintPath>..\packages\VSSDK.Shell.Immutable.10.10.0.3\lib\net40\Microsoft.VisualStudio.Shell.Immutable.10.0.dll</HintPath>
- <Private>True</Private>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.Shell.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <HintPath>..\packages\VSSDK.Shell.Interop.7.0.4\lib\net20\Microsoft.VisualStudio.Shell.Interop.dll</HintPath>
- <Private>True</Private>
- <Private>False</Private>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.Shell.Interop.8.0, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <HintPath>..\packages\VSSDK.Shell.Interop.8.8.0.3\lib\net20\Microsoft.VisualStudio.Shell.Interop.8.0.dll</HintPath>
- <Private>True</Private>
- <Private>False</Private>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.Shell.Interop.10.0" />
- <Reference Include="Microsoft.VisualStudio.Shell.Interop.9.0, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <HintPath>..\packages\VSSDK.Shell.Interop.9.9.0.3\lib\net20\Microsoft.VisualStudio.Shell.Interop.9.0.dll</HintPath>
- <Private>True</Private>
- <Private>False</Private>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.Text.Data, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <HintPath>..\packages\VSSDK.Text.10.0.4\lib\net40\Microsoft.VisualStudio.Text.Data.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.Text.Logic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <HintPath>..\packages\VSSDK.Text.10.0.4\lib\net40\Microsoft.VisualStudio.Text.Logic.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.Text.UI, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <HintPath>..\packages\VSSDK.Text.10.0.4\lib\net40\Microsoft.VisualStudio.Text.UI.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.Text.UI.Wpf, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <HintPath>..\packages\VSSDK.Text.10.0.4\lib\net40\Microsoft.VisualStudio.Text.UI.Wpf.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.TextManager.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <Private>False</Private>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.TextManager.Interop.8.0, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <HintPath>..\packages\VSSDK.TextManager.Interop.8.8.0.4\lib\net20\Microsoft.VisualStudio.TextManager.Interop.8.0.dll</HintPath>
- <Private>True</Private>
- <Private>False</Private>
- </Reference>
- <Reference Include="PresentationCore" />
- <Reference Include="PresentationFramework" />
- <Reference Include="stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <HintPath>..\packages\VSSDK.DTE.7.0.3\lib\net20\stdole.dll</HintPath>
- <EmbedInteropTypes>False</EmbedInteropTypes>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.ComponentModel.Composition" />
- <Reference Include="System.Core" />
- <Reference Include="System.Data" />
- <Reference Include="System.Design" />
- <Reference Include="System.Drawing" />
- <Reference Include="System.Windows.Forms" />
- <Reference Include="System.Xml" />
- <Reference Include="System.Xml.Linq" />
- <Reference Include="WindowsBase" />
- </ItemGroup>
- <ItemGroup>
- <COMReference Include="Microsoft.VisualStudio.CommandBars">
- <Guid>{1CBA492E-7263-47BB-87FE-639000619B15}</Guid>
- <VersionMajor>8</VersionMajor>
- <VersionMinor>0</VersionMinor>
- <Lcid>0</Lcid>
- <WrapperTool>primary</WrapperTool>
- <Isolated>False</Isolated>
- <EmbedInteropTypes>False</EmbedInteropTypes>
- </COMReference>
- <COMReference Include="stdole">
- <Guid>{00020430-0000-0000-C000-000000000046}</Guid>
- <VersionMajor>2</VersionMajor>
- <VersionMinor>0</VersionMinor>
- <Lcid>0</Lcid>
- <WrapperTool>primary</WrapperTool>
- <Isolated>False</Isolated>
- <EmbedInteropTypes>False</EmbedInteropTypes>
- </COMReference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Guids.cs" />
- <Compile Include="Resources.Designer.cs">
- <AutoGen>True</AutoGen>
- <DesignTime>True</DesignTime>
- <DependentUpon>Resources.resx</DependentUpon>
- </Compile>
- <Compile Include="GlobalSuppressions.cs" />
- <Compile Include="ClangFormatPackage.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="PkgCmdID.cs" />
- <Compile Include="RunningDocTableEventsDispatcher.cs" />
- <Compile Include="Vsix.cs" />
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Resources.resx">
- <Generator>ResXFileCodeGenerator</Generator>
- <LastGenOutput>Resources.Designer.cs</LastGenOutput>
- <SubType>Designer</SubType>
- </EmbeddedResource>
- <EmbeddedResource Include="VSPackage.resx">
- <MergeWithCTO>true</MergeWithCTO>
- <ManifestResourceName>VSPackage</ManifestResourceName>
- </EmbeddedResource>
- </ItemGroup>
- <ItemGroup>
- <None Include="Key.snk" />
- <None Include="packages.config">
- <SubType>Designer</SubType>
- </None>
- <None Include="source.extension.vsixmanifest">
- <SubType>Designer</SubType>
- </None>
- </ItemGroup>
- <ItemGroup>
- <VSCTCompile Include="ClangFormat.vsct">
- <ResourceName>Menus.ctmenu</ResourceName>
- </VSCTCompile>
- </ItemGroup>
- <ItemGroup>
- <None Include="Resources\Images_32bit.bmp" />
- </ItemGroup>
- <ItemGroup>
- <Content Include="clang-format.exe">
- <IncludeInVSIX>true</IncludeInVSIX>
- </Content>
- <Content Include="license.txt">
- <IncludeInVSIX>true</IncludeInVSIX>
- </Content>
- <Content Include="Resources\Package.ico" />
- </ItemGroup>
- <ItemGroup>
- <BootstrapperPackage Include=".NETFramework,Version=v4.0">
- <Visible>False</Visible>
- <ProductName>Microsoft .NET Framework 4 %28x86 and x64%29</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5 SP1</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Windows.Installer.4.5">
- <Visible>False</Visible>
- <ProductName>Windows Installer 4.5</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- </ItemGroup>
- <PropertyGroup>
- <UseCodebase>true</UseCodebase>
- </PropertyGroup>
- <PropertyGroup>
- <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
- <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
- </PropertyGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />
- <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\VSSDK\Microsoft.VsSDK.targets" Condition="false" />
- <PropertyGroup>
- <PreBuildEvent>if not exist $(ProjectDir)Key.snk ("$(FrameworkSDKDir)Bin\NETFX 4.6 Tools\sn.exe" -k $(ProjectDir)Key.snk)</PreBuildEvent>
- </PropertyGroup>
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
diff --git a/clang/tools/clang-format-vs/ClangFormat/ClangFormat.vsct b/clang/tools/clang-format-vs/ClangFormat/ClangFormat.vsct
deleted file mode 100644
index 798957740d548c..00000000000000
--- a/clang/tools/clang-format-vs/ClangFormat/ClangFormat.vsct
+++ /dev/null
@@ -1,127 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<CommandTable xmlns="http://schemas.microsoft.com/VisualStudio/2005-10-18/CommandTable" xmlns:xs="http://www.w3.org/2001/XMLSchema">
-
- <!-- This is the file that defines the actual layout and type of the commands.
- It is divided in different sections (e.g. command definition, command
- placement, ...), with each defining a specific set of properties.
- See the comment before each section for more details about how to
- use it. -->
-
- <!-- The VSCT compiler (the tool that translates this file into the binary
- format that VisualStudio will consume) has the ability to run a preprocessor
- on the vsct file; this preprocessor is (usually) the C++ preprocessor, so
- it is possible to define includes and macros with the same syntax used
- in C++ files. Using this ability of the compiler here, we include some files
- defining some of the constants that we will use inside the file. -->
-
- <!--This is the file that defines the IDs for all the commands exposed by VisualStudio. -->
- <Extern href="stdidcmd.h"/>
-
- <!--This header contains the command ids for the menus provided by the shell. -->
- <Extern href="vsshlids.h"/>
-
-
-
-
- <!--The Commands section is where we the commands, menus and menu groups are defined.
- This section uses a Guid to identify the package that provides the command defined inside it. -->
- <Commands package="guidClangFormatPkg">
- <!-- Inside this section we have different sub-sections: one for the menus, another
- for the menu groups, one for the buttons (the actual commands), one for the combos
- and the last one for the bitmaps used. Each element is identified by a command id that
- is a unique pair of guid and numeric identifier; the guid part of the identifier is usually
- called "command set" and is used to group different command inside a logically related
- group; your package should define its own command set in order to avoid collisions
- with command ids defined by other packages. -->
-
-
- <!-- In this section you can define new menu groups. A menu group is a container for
- other menus or buttons (commands); from a visual point of view you can see the
- group as the part of a menu contained between two lines. The parent of a group
- must be a menu. -->
- <Groups>
-
- <Group guid="guidClangFormatCmdSet" id="MyMenuGroup" priority="0x0600">
- <Parent guid="guidSHLMainMenu" id="IDM_VS_MENU_TOOLS"/>
- </Group>
-
-
-
- </Groups>
-
- <!--Buttons section. -->
- <!--This section defines the elements the user can interact with, like a menu command or a button
- or combo box in a toolbar. -->
- <Buttons>
- <!--To define a menu group you have to specify its ID, the parent menu and its display priority.
- The command is visible and enabled by default. If you need to change the visibility, status, etc, you can use
- the CommandFlag node.
- You can add more than one CommandFlag node e.g.:
- <CommandFlag>DefaultInvisible</CommandFlag>
- <CommandFlag>DynamicVisibility</CommandFlag>
- If you do not want an image next to your command, remove the Icon node /> -->
-
- <Button guid="guidClangFormatCmdSet" id="cmdidClangFormatSelection" priority="0x0100" type="Button">
- <Parent guid="guidClangFormatCmdSet" id="MyMenuGroup" />
- <Icon guid="guidImages" id="bmpPic1" />
- <Strings>
- <ButtonText>Clang Format Selection</ButtonText>
- </Strings>
- </Button>
-
- <Button guid="guidClangFormatCmdSet" id="cmdidClangFormatDocument" priority="0x0101" type="Button">
- <Parent guid="guidClangFormatCmdSet" id="MyMenuGroup" />
- <Icon guid="guidImages" id="bmpPic2" />
- <Strings>
- <ButtonText>Clang Format Document</ButtonText>
- </Strings>
- </Button>
-
- </Buttons>
-
- <!--The bitmaps section is used to define the bitmaps that are used for the commands.-->
- <Bitmaps>
- <!-- The bitmap id is defined in a way that is a little bit different from the others:
- the declaration starts with a guid for the bitmap strip, then there is the resource id of the
- bitmap strip containing the bitmaps and then there are the numeric ids of the elements used
- inside a button definition. An important aspect of this declaration is that the element id
- must be the actual index (1-based) of the bitmap inside the bitmap strip. -->
- <Bitmap guid="guidImages" href="Resources\Images_32bit.bmp" usedList="bmpPic1, bmpPic2, bmpPicSearch, bmpPicX, bmpPicArrows"/>
-
- </Bitmaps>
-
- </Commands>
-
-
- <KeyBindings>
- <KeyBinding guid="guidClangFormatCmdSet" id="cmdidClangFormatSelection" editor="guidTextEditor" key1="R" mod1="Control" key2="F" mod2="Control"/>
- <KeyBinding guid="guidClangFormatCmdSet" id="cmdidClangFormatDocument" editor="guidTextEditor" key1="R" mod1="Control" key2="D" mod2="Control"/>
- </KeyBindings>
-
-
-
- <Symbols>
- <!-- This is the package guid. -->
- <GuidSymbol name="guidClangFormatPkg" value="{c5286038-25d3-4f65-83a8-51fa2df4a146}" />
-
- <!-- This is the guid used to group the menu commands together -->
- <GuidSymbol name="guidClangFormatCmdSet" value="{e39cbab1-0f96-4022-a2bc-da5a9db7eb78}">
-
- <IDSymbol name="MyMenuGroup" value="0x1020" />
- <IDSymbol name="cmdidClangFormatSelection" value="0x0100" />
- <IDSymbol name="cmdidClangFormatDocument" value="0x0101" />
- </GuidSymbol>
-
- <GuidSymbol name="guidTextEditor" value="{8B382828-6202-11d1-8870-0000F87579D2}" />
-
-
- <GuidSymbol name="guidImages" value="{6d53937b-9ae1-42e1-8849-d876dcdbad7b}" >
- <IDSymbol name="bmpPic1" value="1" />
- <IDSymbol name="bmpPic2" value="2" />
- <IDSymbol name="bmpPicSearch" value="3" />
- <IDSymbol name="bmpPicX" value="4" />
- <IDSymbol name="bmpPicArrows" value="5" />
- </GuidSymbol>
- </Symbols>
-
-</CommandTable>
diff --git a/clang/tools/clang-format-vs/ClangFormat/ClangFormatPackage.cs b/clang/tools/clang-format-vs/ClangFormat/ClangFormatPackage.cs
deleted file mode 100644
index 26a0af3b55b506..00000000000000
--- a/clang/tools/clang-format-vs/ClangFormat/ClangFormatPackage.cs
+++ /dev/null
@@ -1,464 +0,0 @@
-//===-- ClangFormatPackages.cs - VSPackage for clang-format ------*- C# -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// This class contains a VS extension package that runs clang-format over a
-// selection in a VS text editor.
-//
-//===----------------------------------------------------------------------===//
-
-using EnvDTE;
-using Microsoft.VisualStudio.Shell;
-using Microsoft.VisualStudio.Shell.Interop;
-using Microsoft.VisualStudio.Text;
-using Microsoft.VisualStudio.Text.Editor;
-using System;
-using System.Collections;
-using System.ComponentModel;
-using System.ComponentModel.Design;
-using System.IO;
-using System.Runtime.InteropServices;
-using System.Xml.Linq;
-using System.Linq;
-using System.Text;
-
-namespace LLVM.ClangFormat
-{
- [ClassInterface(ClassInterfaceType.AutoDual)]
- [CLSCompliant(false), ComVisible(true)]
- public class OptionPageGrid : DialogPage
- {
- private string assumeFilename = "";
- private string fallbackStyle = "LLVM";
- private bool sortIncludes = false;
- private string style = "file";
- private bool formatOnSave = false;
- private string formatOnSaveFileExtensions =
- ".c;.cpp;.cxx;.cc;.tli;.tlh;.h;.hh;.hpp;.hxx;.hh;.inl;" +
- ".java;.js;.ts;.m;.mm;.proto;.protodevel;.td";
-
- public OptionPageGrid Clone()
- {
- // Use MemberwiseClone to copy value types.
- var clone = (OptionPageGrid)MemberwiseClone();
- return clone;
- }
-
- public class StyleConverter : TypeConverter
- {
- protected ArrayList values;
- public StyleConverter()
- {
- // Initializes the standard values list with defaults.
- values = new ArrayList(new string[] { "file", "Chromium", "Google", "LLVM", "Mozilla", "WebKit" });
- }
-
- public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
- {
- return true;
- }
-
- public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
- {
- return new StandardValuesCollection(values);
- }
-
- public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
- {
- if (sourceType == typeof(string))
- return true;
-
- return base.CanConvertFrom(context, sourceType);
- }
-
- public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
- {
- string s = value as string;
- if (s == null)
- return base.ConvertFrom(context, culture, value);
-
- return value;
- }
- }
-
- [Category("Format Options")]
- [DisplayName("Style")]
- [Description("Coding style, currently supports:\n" +
- " - Predefined styles ('LLVM', 'Google', 'Chromium', 'Mozilla', 'WebKit').\n" +
- " - 'file' to search for a YAML .clang-format or _clang-format\n" +
- " configuration file.\n" +
- " - A YAML configuration snippet.\n\n" +
- "'File':\n" +
- " Searches for a .clang-format or _clang-format configuration file\n" +
- " in the source file's directory and its parents.\n\n" +
- "YAML configuration snippet:\n" +
- " The content of a .clang-format configuration file, as string.\n" +
- " Example: '{BasedOnStyle: \"LLVM\", IndentWidth: 8}'\n\n" +
- "See also: http://clang.llvm.org/docs/ClangFormatStyleOptions.html.")]
- [TypeConverter(typeof(StyleConverter))]
- public string Style
- {
- get { return style; }
- set { style = value; }
- }
-
- public sealed class FilenameConverter : TypeConverter
- {
- public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
- {
- if (sourceType == typeof(string))
- return true;
-
- return base.CanConvertFrom(context, sourceType);
- }
-
- public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
- {
- string s = value as string;
- if (s == null)
- return base.ConvertFrom(context, culture, value);
-
- // Check if string contains quotes. On Windows, file names cannot contain quotes.
- // We do not accept them however to avoid hard-to-debug problems.
- // A quote in user input would end the parameter quote and so break the command invocation.
- if (s.IndexOf('\"') != -1)
- throw new NotSupportedException("Filename cannot contain quotes");
-
- return value;
- }
- }
-
- [Category("Format Options")]
- [DisplayName("Assume Filename")]
- [Description("When reading from stdin, clang-format assumes this " +
- "filename to look for a style config file (with 'file' style) " +
- "and to determine the language.")]
- [TypeConverter(typeof(FilenameConverter))]
- public string AssumeFilename
- {
- get { return assumeFilename; }
- set { assumeFilename = value; }
- }
-
- public sealed class FallbackStyleConverter : StyleConverter
- {
- public FallbackStyleConverter()
- {
- // Add "none" to the list of styles.
- values.Insert(0, "none");
- }
- }
-
- [Category("Format Options")]
- [DisplayName("Fallback Style")]
- [Description("The name of the predefined style used as a fallback in case clang-format " +
- "is invoked with 'file' style, but can not find the configuration file.\n" +
- "Use 'none' fallback style to skip formatting.")]
- [TypeConverter(typeof(FallbackStyleConverter))]
- public string FallbackStyle
- {
- get { return fallbackStyle; }
- set { fallbackStyle = value; }
- }
-
- [Category("Format Options")]
- [DisplayName("Sort includes")]
- [Description("Sort touched include lines.\n\n" +
- "See also: http://clang.llvm.org/docs/ClangFormat.html.")]
- public bool SortIncludes
- {
- get { return sortIncludes; }
- set { sortIncludes = value; }
- }
-
- [Category("Format On Save")]
- [DisplayName("Enable")]
- [Description("Enable running clang-format when modified files are saved. " +
- "Will only format if Style is found (ignores Fallback Style)."
- )]
- public bool FormatOnSave
- {
- get { return formatOnSave; }
- set { formatOnSave = value; }
- }
-
- [Category("Format On Save")]
- [DisplayName("File extensions")]
- [Description("When formatting on save, clang-format will be applied only to " +
- "files with these extensions.")]
- public string FormatOnSaveFileExtensions
- {
- get { return formatOnSaveFileExtensions; }
- set { formatOnSaveFileExtensions = value; }
- }
- }
-
- [PackageRegistration(UseManagedResourcesOnly = true)]
- [InstalledProductRegistration("#110", "#112", "1.0", IconResourceID = 400)]
- [ProvideMenuResource("Menus.ctmenu", 1)]
- [ProvideAutoLoad(UIContextGuids80.SolutionExists)] // Load package on solution load
- [Guid(GuidList.guidClangFormatPkgString)]
- [ProvideOptionPage(typeof(OptionPageGrid), "LLVM/Clang", "ClangFormat", 0, 0, true)]
- public sealed class ClangFormatPackage : Package
- {
- #region Package Members
-
- RunningDocTableEventsDispatcher _runningDocTableEventsDispatcher;
-
- protected override void Initialize()
- {
- base.Initialize();
-
- _runningDocTableEventsDispatcher = new RunningDocTableEventsDispatcher(this);
- _runningDocTableEventsDispatcher.BeforeSave += OnBeforeSave;
-
- var commandService = GetService(typeof(IMenuCommandService)) as OleMenuCommandService;
- if (commandService != null)
- {
- {
- var menuCommandID = new CommandID(GuidList.guidClangFormatCmdSet, (int)PkgCmdIDList.cmdidClangFormatSelection);
- var menuItem = new MenuCommand(MenuItemCallback, menuCommandID);
- commandService.AddCommand(menuItem);
- }
-
- {
- var menuCommandID = new CommandID(GuidList.guidClangFormatCmdSet, (int)PkgCmdIDList.cmdidClangFormatDocument);
- var menuItem = new MenuCommand(MenuItemCallback, menuCommandID);
- commandService.AddCommand(menuItem);
- }
- }
- }
- #endregion
-
- OptionPageGrid GetUserOptions()
- {
- return (OptionPageGrid)GetDialogPage(typeof(OptionPageGrid));
- }
-
- private void MenuItemCallback(object sender, EventArgs args)
- {
- var mc = sender as System.ComponentModel.Design.MenuCommand;
- if (mc == null)
- return;
-
- switch (mc.CommandID.ID)
- {
- case (int)PkgCmdIDList.cmdidClangFormatSelection:
- FormatSelection(GetUserOptions());
- break;
-
- case (int)PkgCmdIDList.cmdidClangFormatDocument:
- FormatDocument(GetUserOptions());
- break;
- }
- }
-
- private static bool FileHasExtension(string filePath, string fileExtensions)
- {
- var extensions = fileExtensions.ToLower().Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
- return extensions.Contains(Path.GetExtension(filePath).ToLower());
- }
-
- private void OnBeforeSave(object sender, Document document)
- {
- var options = GetUserOptions();
-
- if (!options.FormatOnSave)
- return;
-
- if (!FileHasExtension(document.FullName, options.FormatOnSaveFileExtensions))
- return;
-
- if (!Vsix.IsDocumentDirty(document))
- return;
-
- var optionsWithNoFallbackStyle = GetUserOptions().Clone();
- optionsWithNoFallbackStyle.FallbackStyle = "none";
- FormatDocument(document, optionsWithNoFallbackStyle);
- }
-
- /// <summary>
- /// Runs clang-format on the current selection
- /// </summary>
- private void FormatSelection(OptionPageGrid options)
- {
- IWpfTextView view = Vsix.GetCurrentView();
- if (view == null)
- // We're not in a text view.
- return;
- string text = view.TextBuffer.CurrentSnapshot.GetText();
- int start = view.Selection.Start.Position.GetContainingLine().Start.Position;
- int end = view.Selection.End.Position.GetContainingLine().End.Position;
-
- // clang-format doesn't support formatting a range that starts at the end
- // of the file.
- if (start >= text.Length && text.Length > 0)
- start = text.Length - 1;
- string path = Vsix.GetDocumentParent(view);
- string filePath = Vsix.GetDocumentPath(view);
-
- RunClangFormatAndApplyReplacements(text, start, end, path, filePath, options, view);
- }
-
- /// <summary>
- /// Runs clang-format on the current document
- /// </summary>
- private void FormatDocument(OptionPageGrid options)
- {
- FormatView(Vsix.GetCurrentView(), options);
- }
-
- private void FormatDocument(Document document, OptionPageGrid options)
- {
- FormatView(Vsix.GetDocumentView(document), options);
- }
-
- private void FormatView(IWpfTextView view, OptionPageGrid options)
- {
- if (view == null)
- // We're not in a text view.
- return;
-
- string filePath = Vsix.GetDocumentPath(view);
- var path = Path.GetDirectoryName(filePath);
-
- string text = view.TextBuffer.CurrentSnapshot.GetText();
- if (!text.EndsWith(Environment.NewLine))
- {
- view.TextBuffer.Insert(view.TextBuffer.CurrentSnapshot.Length, Environment.NewLine);
- text += Environment.NewLine;
- }
-
- RunClangFormatAndApplyReplacements(text, 0, text.Length, path, filePath, options, view);
- }
-
- private void RunClangFormatAndApplyReplacements(string text, int start, int end, string path, string filePath, OptionPageGrid options, IWpfTextView view)
- {
- try
- {
- string replacements = RunClangFormat(text, start, end, path, filePath, options);
- ApplyClangFormatReplacements(replacements, view);
- }
- catch (Exception e)
- {
- var uiShell = (IVsUIShell)GetService(typeof(SVsUIShell));
- var id = Guid.Empty;
- int result;
- uiShell.ShowMessageBox(
- 0, ref id,
- "Error while running clang-format:",
- e.Message,
- string.Empty, 0,
- OLEMSGBUTTON.OLEMSGBUTTON_OK,
- OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_FIRST,
- OLEMSGICON.OLEMSGICON_INFO,
- 0, out result);
- }
- }
-
- /// <summary>
- /// Runs the given text through clang-format and returns the replacements as XML.
- ///
- /// Formats the text in range start and end.
- /// </summary>
- private static string RunClangFormat(string text, int start, int end, string path, string filePath, OptionPageGrid options)
- {
- string vsixPath = Path.GetDirectoryName(
- typeof(ClangFormatPackage).Assembly.Location);
-
- System.Diagnostics.Process process = new System.Diagnostics.Process();
- process.StartInfo.UseShellExecute = false;
- process.StartInfo.FileName = vsixPath + "\\clang-format.exe";
- char[] chars = text.ToCharArray();
- int offset = Encoding.UTF8.GetByteCount(chars, 0, start);
- int length = Encoding.UTF8.GetByteCount(chars, 0, end) - offset;
- // Poor man's escaping - this will not work when quotes are already escaped
- // in the input (but we don't need more).
- string style = options.Style.Replace("\"", "\\\"");
- string fallbackStyle = options.FallbackStyle.Replace("\"", "\\\"");
- process.StartInfo.Arguments = " -offset " + offset +
- " -length " + length +
- " -output-replacements-xml " +
- " -style \"" + style + "\"" +
- " -fallback-style \"" + fallbackStyle + "\"";
- if (options.SortIncludes)
- process.StartInfo.Arguments += " -sort-includes ";
- string assumeFilename = options.AssumeFilename;
- if (string.IsNullOrEmpty(assumeFilename))
- assumeFilename = filePath;
- if (!string.IsNullOrEmpty(assumeFilename))
- process.StartInfo.Arguments += " -assume-filename \"" + assumeFilename + "\"";
- process.StartInfo.CreateNoWindow = true;
- process.StartInfo.RedirectStandardInput = true;
- process.StartInfo.RedirectStandardOutput = true;
- process.StartInfo.RedirectStandardError = true;
- if (path != null)
- process.StartInfo.WorkingDirectory = path;
- // We have to be careful when communicating via standard input / output,
- // as writes to the buffers will block until they are read from the other side.
- // Thus, we:
- // 1. Start the process - clang-format.exe will start to read the input from the
- // standard input.
- try
- {
- process.Start();
- }
- catch (Exception e)
- {
- throw new Exception(
- "Cannot execute " + process.StartInfo.FileName + ".\n\"" +
- e.Message + "\".\nPlease make sure it is on the PATH.");
- }
- // 2. We write everything to the standard output - this cannot block, as clang-format
- // reads the full standard input before analyzing it without writing anything to the
- // standard output.
- StreamWriter utf8Writer = new StreamWriter(process.StandardInput.BaseStream, new UTF8Encoding(false));
- utf8Writer.Write(text);
- // 3. We notify clang-format that the input is done - after this point clang-format
- // will start analyzing the input and eventually write the output.
- utf8Writer.Close();
- // 4. We must read clang-format's output before waiting for it to exit; clang-format
- // will close the channel by exiting.
- string output = process.StandardOutput.ReadToEnd();
- // 5. clang-format is done, wait until it is fully shut down.
- process.WaitForExit();
- if (process.ExitCode != 0)
- {
- // FIXME: If clang-format writes enough to the standard error stream to block,
- // we will never reach this point; instead, read the standard error asynchronously.
- throw new Exception(process.StandardError.ReadToEnd());
- }
- return output;
- }
-
- /// <summary>
- /// Applies the clang-format replacements (xml) to the current view
- /// </summary>
- private static void ApplyClangFormatReplacements(string replacements, IWpfTextView view)
- {
- // clang-format returns no replacements if input text is empty
- if (replacements.Length == 0)
- return;
-
- string text = view.TextBuffer.CurrentSnapshot.GetText();
- byte[] bytes = Encoding.UTF8.GetBytes(text);
-
- var root = XElement.Parse(replacements);
- var edit = view.TextBuffer.CreateEdit();
- foreach (XElement replacement in root.Descendants("replacement"))
- {
- int offset = int.Parse(replacement.Attribute("offset").Value);
- int length = int.Parse(replacement.Attribute("length").Value);
- var span = new Span(
- Encoding.UTF8.GetCharCount(bytes, 0, offset),
- Encoding.UTF8.GetCharCount(bytes, offset, length));
- edit.Replace(span, replacement.Value);
- }
- edit.Apply();
- }
- }
-}
diff --git a/clang/tools/clang-format-vs/ClangFormat/GlobalSuppressions.cs b/clang/tools/clang-format-vs/ClangFormat/GlobalSuppressions.cs
deleted file mode 100644
index 175a74e291df24..00000000000000
--- a/clang/tools/clang-format-vs/ClangFormat/GlobalSuppressions.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-// This file is used by Code Analysis to maintain SuppressMessage
-// attributes that are applied to this project. Project-level
-// suppressions either have no target or are given a specific target
-// and scoped to a namespace, type, member, etc.
-//
-// To add a suppression to this file, right-click the message in the
-// Error List, point to "Suppress Message(s)", and click "In Project
-// Suppression File". You do not need to add suppressions to this
-// file manually.
-
-[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1017:MarkAssembliesWithComVisible")]
diff --git a/clang/tools/clang-format-vs/ClangFormat/Guids.cs b/clang/tools/clang-format-vs/ClangFormat/Guids.cs
deleted file mode 100644
index ed1c12d61e4ea2..00000000000000
--- a/clang/tools/clang-format-vs/ClangFormat/Guids.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using System;
-
-namespace LLVM.ClangFormat
-{
- static class GuidList
- {
- public const string guidClangFormatPkgString = "c5286038-25d3-4f65-83a8-51fa2df4a146";
- public const string guidClangFormatCmdSetString = "e39cbab1-0f96-4022-a2bc-da5a9db7eb78";
-
- public static readonly Guid guidClangFormatCmdSet = new Guid(guidClangFormatCmdSetString);
- };
-}
diff --git a/clang/tools/clang-format-vs/ClangFormat/PkgCmdID.cs b/clang/tools/clang-format-vs/ClangFormat/PkgCmdID.cs
deleted file mode 100644
index c274d1ca1b4b2e..00000000000000
--- a/clang/tools/clang-format-vs/ClangFormat/PkgCmdID.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-namespace LLVM.ClangFormat
-{
- static class PkgCmdIDList
- {
- public const uint cmdidClangFormatSelection = 0x100;
- public const uint cmdidClangFormatDocument = 0x101;
- };
-}
diff --git a/clang/tools/clang-format-vs/ClangFormat/Properties/AssemblyInfo.cs b/clang/tools/clang-format-vs/ClangFormat/Properties/AssemblyInfo.cs
deleted file mode 100644
index b1cef49414b5eb..00000000000000
--- a/clang/tools/clang-format-vs/ClangFormat/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-using System;
-using System.Reflection;
-using System.Resources;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("ClangFormat")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("LLVM")]
-[assembly: AssemblyProduct("ClangFormat")]
-[assembly: AssemblyCopyright("")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-[assembly: ComVisible(false)]
-[assembly: CLSCompliant(false)]
-[assembly: NeutralResourcesLanguage("en-US")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers
-// by using the '*' as shown below:
-
-[assembly: AssemblyVersion("1.1.0.0")]
-[assembly: AssemblyFileVersion("1.1.0.0")]
diff --git a/clang/tools/clang-format-vs/ClangFormat/Resources.Designer.cs b/clang/tools/clang-format-vs/ClangFormat/Resources.Designer.cs
deleted file mode 100644
index e3129b3db83ae1..00000000000000
--- a/clang/tools/clang-format-vs/ClangFormat/Resources.Designer.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace LLVM.ClangFormat {
- using System;
-
-
- /// <summary>
- /// A strongly-typed resource class, for looking up localized strings, etc.
- /// </summary>
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources() {
- }
-
- /// <summary>
- /// Returns the cached ResourceManager instance used by this class.
- /// </summary>
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager {
- get {
- if (object.ReferenceEquals(resourceMan, null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("LLVM.ClangFormat.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- /// <summary>
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- /// </summary>
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture {
- get {
- return resourceCulture;
- }
- set {
- resourceCulture = value;
- }
- }
- }
-}
diff --git a/clang/tools/clang-format-vs/ClangFormat/Resources.resx b/clang/tools/clang-format-vs/ClangFormat/Resources.resx
deleted file mode 100644
index 352987aa07bc69..00000000000000
--- a/clang/tools/clang-format-vs/ClangFormat/Resources.resx
+++ /dev/null
@@ -1,129 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- VS SDK Notes: This resx file contains the resources that will be consumed directly by your package.
- For example, if you chose to create a tool window, there is a resource with ID 'CanNotCreateWindow'. This
- is used in VsPkg.cs to determine the string to show the user if there is an error when attempting to create
- the tool window.
-
- Resources that are accessed directly from your package *by Visual Studio* are stored in the VSPackage.resx
- file.
--->
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" use="required" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
-</root>
\ No newline at end of file
diff --git a/clang/tools/clang-format-vs/ClangFormat/Resources/Images_32bit.bmp b/clang/tools/clang-format-vs/ClangFormat/Resources/Images_32bit.bmp
deleted file mode 100644
index 2fa7ab009985537a36a1ae9c5e8391b24da89217..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 5176
zcmdUzc~DbF9LJ+|tkcf4j$=ngJC>OqwzcAYRjpN;)_Q?Qy^456L=jXXhoTgs0^W+K
zs6eZNsHi9iR;dVzpm-smAZk!hK;)7m2qF1)f01WjHV2)tf7s0Yvim!}`}Tcici&4!
zjvLfbqWcVB-(NDbW!9cqD~TohmPlH&e24d6nJ&P-0Q~PPCnx7y*X7I8Q`6EW{MYk8
z|LfOmNYhOC{932!@OAtJ-t#BIYmN<8%o+<fyHSwOkYednYq(7Q9*ZY_heb9+;5dFT
z9L5ZU?C1W?))#N8H#b*tPNUVfCO<VTb>cW%8}!*63u}kvEcEJLV-jKW-lw^^k&Qk=
z%vhUW*kqY>MKj!3j at Z<CTeFmDev}t8^j|X5RQ&*!kc-TbA6GWIKRA6CRx?th5$mb1
zx7JC|$ISTxyY9PF;h$Rx*^UUEzPt(_wfzd}cHOEl!ZsV(_tD$fIMILB+uF{47;VwD
zN~aUo5R;}I_ISExf?1;)F~g1WIR;}jk2^X(KK>YO@$m5QU=}mrw_xl*aQZH}xw*fs
zU%x(*bi9e at OMTMwG2Yi|wXG;-ik(p3Z46W$`a{#MI~rDP#g>vXbQW?AjcA*htL-sl
zd{GLqGscf<i5>9~bjDhNv5?#9;b5wMKui1_#|;Lj?^0e~?!j{--^$ABk#J3+CB4w6
zwxmGW`^LHB`*y5yy5ceIhZ>J*)(Bbc^f>DHF}EK5MuJ~=dfGB{?KKe^OKWJ`_XQ4~
z!aO1W;4waTUE8=>U>C6arH7E?TVlw^#6F)7T)EIxJ<rchJP!4pCJY6q|A58iv|fps
zzrX)s@<pb%e at V|ix|s5A#*coElj}l#=i|ZwZ)6<z$LXDN>~Nc|JA-X}w(IR#K__k>
z7NVD>6d-=@bOWwtV%U=sblrDEv%sQ%RSEHP^sGEuSfu$_tTWfY={$_3_0Ju#zsuXj
zRK7)i&Xb12h+cPYDin$+Vn}UWU7Z`dhyj1nvyY^{uBPL97rPh9Q5#Wq`zR_hPoV5p
zB#P6*kQ=iB`+euab;`)s=N)NG8QZt7*WvtCIArgRSm`YFm5%*t;H*%ey?9OYlPN79
zr*n?>t2u^y6|PLCHy=80$XevLgx!-7J>45y1&|92rBdl_@|o$~H|Z&M`OJv}C-?Z)
zSLdHY&EsTLGpkZ2pgcDQ#n%oZi><{#`BXSN%&g_dFy_-bv|`(k_VXv~62wkAM^o^i
z0Blw2&%u;0u%lM|yx{9Y{oGkdZ%mm+qoG4lChWuJ=f`}mPU1RE3M2XtSzRY)dJLP#
z(BnsX8uL`x_J=qA3P)|pb*L(GP+ysc+R{u^7hFc!omdoJ3PoIyD*{~XZ&H0r_N*M1
z!BN;Yf}MbaW&m?n<8o>Sr0OQLX-UiHi5(vk`+sa$$>(Ks*1Nd4oCyjF+E07X6hC+N
zp2+Emo4mBNbcIr>T+RA2+PgGH&z?Q=nXh;6q^H<!-(@JwOF{h$B^p)Fp?+C`hMFSO
zKFdPogG3akN8tJ)1zaZ&*VU88oL$X=tzRfkPxAzZvd1Y|<QXh8r!kdliC_2 at Zzk27
zk1RSmI*{&JFjM?i%o+nu--)=1c*zBR6yvTVAw9(|oIG^rR!Te?>PpenSc4{YE!3(C
zsLJ!$K2Bz5;SnSqSdA5Sqbm6^ct7bnX1i`i4zXM0hbMWD&|6 at 5`XUVW5U=O`miR?(
zS1^elzuwH3r=+9=SXfw8(tS7cGdTaf=GuVM>((EgcLGCNchsl#%w0!9dWt>HyBn5#
z`fyFv^FpW_8M}rTXk;ww%5(4{{{o7xg(Ga8BjO`NXtE~PUQ_~n76%}o*g330$*CmJ
z;Uq~+$GqvDXdsSzk7J9uG5B0d{GxWQV-kZoeZgW*adB~5&GGYgm;@twJKDd*i?jl}
z=4Y_py_24<T~k%jIXU*o)!V6w8dYs68dOD4RV&#UcoR>vV-OeSgO&E98=n_H{mjT*
zbz_E{!0v^9C?t07+mLZS9Wrt4xil;a2tyn(%*-=<7ZBG{UwD@$eq`d`Y~tDz!5f%s
zz>nr+#Z3I}X0ZMg3#Y({o}M4$I4zAsv3AT}GbFv>7e9L7lN56#BmF{b{oQK`P-Z9K
zQcN%+wz*@od{$X@`bC553tF!rT%GCx5IeVRxP9 at aaXtkl_=ea;#ABnNHP;FZ&Aq>z
z3fY3_JsS|U%MXVG*C1l64-Rbd!tVi|2wCTbV8v4G^j?fWuZ6nb8k?5SMZi*fo%uP>
zz?<rY`D-<rHuZJ2V;<eh+M9MZ`qG(0d+&vBS3Es;G&HfgxL~|cXRKYj4+%3 at LFE~U
u8(H^Z-KfU9#_F_Mw5E8I=HEYu&9O6fjkhQE>i?FvXFmVz8}XbZlD`2e)heX`
diff --git a/clang/tools/clang-format-vs/ClangFormat/Resources/Package.ico b/clang/tools/clang-format-vs/ClangFormat/Resources/Package.ico
deleted file mode 100644
index ea3b23fe8d4b3a45be89f9286e617624007290be..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 1078
zcmc&xJ8l9o5PeG`(IBx$SZ#smxB at 50S<)>X?vjox?E$y~f|6<r8d3zD_v|rp&=Tb*
z at zyi5?~OepkAVUMlw}EFS^yKqs)~F+0G_B#sY$751s>^vHuyg004_Ke13iCf4sF{q
z;lqOW`lIoaB$u%Ct2e&_Qe3<W<ju>Xk#6xfx?>a7JsvGS1C78t at vc9%2c8+y#&J#+
z%g<?PP8{zAnqi!*Bp247=A<&hXq`cv(@c2(Kdvcxt9Piaf$_SY`DRHi<6%d}b^KOd
z_44{w{j&c%d_!!lpZ1@~Q@?PY=}-K$N%hZN*Ky1Cic^a9EPs<TVaWOirI%;VweEYr
Luk$-#cu)HP|0&v8
diff --git a/clang/tools/clang-format-vs/ClangFormat/RunningDocTableEventsDispatcher.cs b/clang/tools/clang-format-vs/ClangFormat/RunningDocTableEventsDispatcher.cs
deleted file mode 100644
index 163f68dbda3cb4..00000000000000
--- a/clang/tools/clang-format-vs/ClangFormat/RunningDocTableEventsDispatcher.cs
+++ /dev/null
@@ -1,79 +0,0 @@
-using EnvDTE;
-using Microsoft.VisualStudio;
-using Microsoft.VisualStudio.Shell;
-using Microsoft.VisualStudio.Shell.Interop;
-using System.Linq;
-
-namespace LLVM.ClangFormat
-{
- // Exposes event sources for IVsRunningDocTableEvents3 events.
- internal sealed class RunningDocTableEventsDispatcher : IVsRunningDocTableEvents3
- {
- private RunningDocumentTable _runningDocumentTable;
- private DTE _dte;
-
- public delegate void OnBeforeSaveHander(object sender, Document document);
- public event OnBeforeSaveHander BeforeSave;
-
- public RunningDocTableEventsDispatcher(Package package)
- {
- _runningDocumentTable = new RunningDocumentTable(package);
- _runningDocumentTable.Advise(this);
- _dte = (DTE)Package.GetGlobalService(typeof(DTE));
- }
-
- public int OnAfterAttributeChange(uint docCookie, uint grfAttribs)
- {
- return VSConstants.S_OK;
- }
-
- public int OnAfterAttributeChangeEx(uint docCookie, uint grfAttribs, IVsHierarchy pHierOld, uint itemidOld, string pszMkDocumentOld, IVsHierarchy pHierNew, uint itemidNew, string pszMkDocumentNew)
- {
- return VSConstants.S_OK;
- }
-
- public int OnAfterDocumentWindowHide(uint docCookie, IVsWindowFrame pFrame)
- {
- return VSConstants.S_OK;
- }
-
- public int OnAfterFirstDocumentLock(uint docCookie, uint dwRDTLockType, uint dwReadLocksRemaining, uint dwEditLocksRemaining)
- {
- return VSConstants.S_OK;
- }
-
- public int OnAfterSave(uint docCookie)
- {
- return VSConstants.S_OK;
- }
-
- public int OnBeforeDocumentWindowShow(uint docCookie, int fFirstShow, IVsWindowFrame pFrame)
- {
- return VSConstants.S_OK;
- }
-
- public int OnBeforeLastDocumentUnlock(uint docCookie, uint dwRDTLockType, uint dwReadLocksRemaining, uint dwEditLocksRemaining)
- {
- return VSConstants.S_OK;
- }
-
- public int OnBeforeSave(uint docCookie)
- {
- if (BeforeSave != null)
- {
- var document = FindDocumentByCookie(docCookie);
- if (document != null) // Not sure why this happens sometimes
- {
- BeforeSave(this, FindDocumentByCookie(docCookie));
- }
- }
- return VSConstants.S_OK;
- }
-
- private Document FindDocumentByCookie(uint docCookie)
- {
- var documentInfo = _runningDocumentTable.GetDocumentInfo(docCookie);
- return _dte.Documents.Cast<Document>().FirstOrDefault(doc => doc.FullName == documentInfo.Moniker);
- }
- }
-}
diff --git a/clang/tools/clang-format-vs/ClangFormat/VSPackage.resx b/clang/tools/clang-format-vs/ClangFormat/VSPackage.resx
deleted file mode 100644
index 81102d38a07a58..00000000000000
--- a/clang/tools/clang-format-vs/ClangFormat/VSPackage.resx
+++ /dev/null
@@ -1,140 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- VS SDK Notes: This resx file contains the resources that will be consumed from your package by Visual Studio.
- For example, Visual Studio will attempt to load resource '400' from this resource stream when it needs to
- load your package's icon. Because Visual Studio will always look in the VSPackage.resources stream first for
- resources it needs, you should put additional resources that Visual Studio will load directly into this resx
- file.
-
- Resources that you would like to access directly from your package in a strong-typed fashion should be stored
- in Resources.resx or another resx file.
--->
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" use="required" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
- <data name="110" xml:space="preserve">
- <value>ClangFormat</value>
- </data>
- <data name="112" xml:space="preserve">
- <value>Formats code by calling the clang-format executable.</value>
- </data>
- <data name="400" type="System.Resources.ResXFileRef, System.Windows.Forms">
- <value>Resources\Package.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
- </data>
-</root>
\ No newline at end of file
diff --git a/clang/tools/clang-format-vs/ClangFormat/Vsix.cs b/clang/tools/clang-format-vs/ClangFormat/Vsix.cs
deleted file mode 100644
index 0d86cb59828a27..00000000000000
--- a/clang/tools/clang-format-vs/ClangFormat/Vsix.cs
+++ /dev/null
@@ -1,96 +0,0 @@
-using EnvDTE;
-using Microsoft.VisualStudio.Editor;
-using Microsoft.VisualStudio.Shell;
-using Microsoft.VisualStudio.Shell.Interop;
-using Microsoft.VisualStudio.Text;
-using Microsoft.VisualStudio.Text.Editor;
-using Microsoft.VisualStudio.TextManager.Interop;
-using System;
-using System.IO;
-
-namespace LLVM.ClangFormat
-{
- internal sealed class Vsix
- {
- /// <summary>
- /// Returns the currently active view if it is a IWpfTextView.
- /// </summary>
- public static IWpfTextView GetCurrentView()
- {
- // The SVsTextManager is a service through which we can get the active view.
- var textManager = (IVsTextManager)Package.GetGlobalService(typeof(SVsTextManager));
- IVsTextView textView;
- textManager.GetActiveView(1, null, out textView);
-
- // Now we have the active view as IVsTextView, but the text interfaces we need
- // are in the IWpfTextView.
- return VsToWpfTextView(textView);
- }
-
- public static bool IsDocumentDirty(Document document)
- {
- var textView = GetDocumentView(document);
- var textDocument = GetTextDocument(textView);
- return textDocument?.IsDirty == true;
- }
-
- public static IWpfTextView GetDocumentView(Document document)
- {
- var textView = GetVsTextViewFrompPath(document.FullName);
- return VsToWpfTextView(textView);
- }
-
- public static IWpfTextView VsToWpfTextView(IVsTextView textView)
- {
- var userData = (IVsUserData)textView;
- if (userData == null)
- return null;
- Guid guidWpfViewHost = DefGuidList.guidIWpfTextViewHost;
- object host;
- userData.GetData(ref guidWpfViewHost, out host);
- return ((IWpfTextViewHost)host).TextView;
- }
-
- public static IVsTextView GetVsTextViewFrompPath(string filePath)
- {
- // From http://stackoverflow.com/a/2427368/4039972
- var dte2 = (EnvDTE80.DTE2)Package.GetGlobalService(typeof(SDTE));
- var sp = (Microsoft.VisualStudio.OLE.Interop.IServiceProvider)dte2;
- var serviceProvider = new Microsoft.VisualStudio.Shell.ServiceProvider(sp);
-
- IVsUIHierarchy uiHierarchy;
- uint itemID;
- IVsWindowFrame windowFrame;
- if (VsShellUtilities.IsDocumentOpen(serviceProvider, filePath, Guid.Empty,
- out uiHierarchy, out itemID, out windowFrame))
- {
- // Get the IVsTextView from the windowFrame.
- return VsShellUtilities.GetTextView(windowFrame);
- }
- return null;
- }
-
- public static ITextDocument GetTextDocument(IWpfTextView view)
- {
- ITextDocument document;
- if (view != null && view.TextBuffer.Properties.TryGetProperty(typeof(ITextDocument), out document))
- return document;
- return null;
- }
-
- public static string GetDocumentParent(IWpfTextView view)
- {
- ITextDocument document = GetTextDocument(view);
- if (document != null)
- {
- return Directory.GetParent(document.FilePath).ToString();
- }
- return null;
- }
-
- public static string GetDocumentPath(IWpfTextView view)
- {
- return GetTextDocument(view)?.FilePath;
- }
- }
-}
diff --git a/clang/tools/clang-format-vs/ClangFormat/license.txt b/clang/tools/clang-format-vs/ClangFormat/license.txt
deleted file mode 100644
index 63c17f148e7a99..00000000000000
--- a/clang/tools/clang-format-vs/ClangFormat/license.txt
+++ /dev/null
@@ -1,261 +0,0 @@
-==============================================================================
-The LLVM Project is under the Apache License v2.0 with LLVM Exceptions:
-==============================================================================
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-
----- LLVM Exceptions to the Apache 2.0 License ----
-
-As an exception, if, as a result of your compiling your source code, portions
-of this Software are embedded into an Object form of such source code, you
-may redistribute such embedded portions in such Object form without complying
-with the conditions of Sections 4(a), 4(b) and 4(d) of the License.
-
-In addition, if you combine or link compiled forms of this Software with
-software that is licensed under the GPLv2 ("Combined Software") and if a
-court of competent jurisdiction determines that the patent provision (Section
-3), the indemnity provision (Section 9) or other Section of the License
-conflicts with the conditions of the GPLv2, you may retroactively and
-prospectively choose to deem waived or otherwise exclude such Section(s) of
-the License, but only in their entirety and only with respect to the Combined
-Software.
-
-==============================================================================
-Software from third parties included in the LLVM Project:
-==============================================================================
-The LLVM Project contains third party software which is under different license
-terms. All such code will be identified clearly using at least one of two
-mechanisms:
-1) It will be in a separate directory tree with its own `LICENSE.txt` or
- `LICENSE` file at the top containing the specific license and restrictions
- which apply to that software, or
-2) It will contain specific license and restriction terms at the top of every
- file.
-
-==============================================================================
-Legacy LLVM License (https://llvm.org/docs/DeveloperPolicy.html#legacy):
-==============================================================================
-University of Illinois/NCSA
-Open Source License
-
-Copyright (c) 2007-2018 University of Illinois at Urbana-Champaign.
-All rights reserved.
-
-Developed by:
-
- LLVM Team
-
- University of Illinois at Urbana-Champaign
-
- http://llvm.org
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal with the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
- * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimers.
-
- * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimers in the documentation and/or other materials provided with the distribution.
-
- * Neither the names of the LLVM Team, University of Illinois at Urbana-Champaign, nor the names of its contributors may be used to endorse or promote products derived from this Software without specific prior written permission.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE.
diff --git a/clang/tools/clang-format-vs/ClangFormat/packages.config b/clang/tools/clang-format-vs/ClangFormat/packages.config
deleted file mode 100644
index 07dc281178f590..00000000000000
--- a/clang/tools/clang-format-vs/ClangFormat/packages.config
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
- <package id="VSSDK.CoreUtility" version="10.0.4" targetFramework="net40" />
- <package id="VSSDK.CoreUtility.10" version="10.0.4" targetFramework="net40" />
- <package id="VSSDK.Editor" version="10.0.4" targetFramework="net40" />
- <package id="VSSDK.Editor.10" version="10.0.4" targetFramework="net40" />
- <package id="VSSDK.IDE" version="7.0.4" targetFramework="net40" />
- <package id="VSSDK.IDE.10" version="10.0.4" targetFramework="net40" />
- <package id="VSSDK.IDE.8" version="8.0.4" targetFramework="net40" />
- <package id="VSSDK.IDE.9" version="9.0.3" targetFramework="net40" />
- <package id="VSSDK.OLE.Interop" version="7.0.4" targetFramework="net40" />
- <package id="VSSDK.Shell.10" version="10.0.3" targetFramework="net40" />
- <package id="VSSDK.Shell.Immutable.10" version="10.0.3" targetFramework="net40" />
- <package id="VSSDK.Shell.Interop" version="7.0.4" targetFramework="net40" />
- <package id="VSSDK.Shell.Interop.8" version="8.0.3" targetFramework="net40" />
- <package id="VSSDK.Shell.Interop.9" version="9.0.3" targetFramework="net40" />
- <package id="VSSDK.Text" version="10.0.4" targetFramework="net40" />
- <package id="VSSDK.Text.10" version="10.0.4" targetFramework="net40" />
- <package id="VSSDK.TextManager.Interop" version="7.0.4" targetFramework="net40" />
- <package id="VSSDK.TextManager.Interop.8" version="8.0.4" targetFramework="net40" />
-</packages>
\ No newline at end of file
diff --git a/clang/tools/clang-format-vs/README.txt b/clang/tools/clang-format-vs/README.txt
deleted file mode 100644
index 2cac5b9af9e3cc..00000000000000
--- a/clang/tools/clang-format-vs/README.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-This directory contains a VSPackage project to generate a Visual Studio extension
-for clang-format.
-
-Build prerequisites are:
-- Visual Studio 2015
-- Extensions SDK (you'll be prompted to install it if you open ClangFormat.sln)
-
-The extension is built using CMake to generate the usual LLVM.sln by setting
-the following CMake vars:
-
-- BUILD_CLANG_FORMAT_VS_PLUGIN=ON
-
-- NUGET_EXE_DIR=path/to/nuget_dir (unless nuget.exe is already available in PATH)
-
-example:
- cd /d C:\code\llvm
- mkdir build & cd build
- cmake -DBUILD_CLANG_FORMAT_VS_PLUGIN=ON -DNUGET_EXE_DIR=C:\nuget ..
-
-Once LLVM.sln is generated, build the clang_format_vsix target, which will build
-ClangFormat.sln, the C# extension application.
-
-The CMake build will copy clang-format.exe and LICENSE.TXT into the ClangFormat/
-directory so they can be bundled with the plug-in, as well as creating
-ClangFormat/source.extension.vsixmanifest. Once the plug-in has been built with
-CMake once, it can be built manually from the ClangFormat.sln solution in Visual
-Studio.
-
-===========
- Debugging
-===========
-
-Once you've built the clang_format_vsix project from LLVM.sln at least once,
-open ClangFormat.sln in Visual Studio, then:
-
-- Make sure the "Debug" target is selected
-- Open the ClangFormat project properties
-- Select the Debug tab
-- Set "Start external program:" to where your devenv.exe is installed. Typically
- it's "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe"
-- Set "Command line arguments" to: /rootsuffix Exp
-- You can now set breakpoints if you like
-- Press F5 to build and run with debugger
-
-If all goes well, a new instance of Visual Studio will be launched in a special
-mode where it uses the experimental hive instead of the normal configuration hive.
-By default, when you build a VSIX project in Visual Studio, it auto-registers the
-extension in the experimental hive, allowing you to test it. In the new Visual Studio
-instance, open or create a C++ solution, and you should now see the Clang Format
-entries in the Tool menu. You can test it out, and any breakpoints you set will be
-hit where you can debug as usual.
diff --git a/clang/tools/clang-format-vs/source.extension.vsixmanifest.in b/clang/tools/clang-format-vs/source.extension.vsixmanifest.in
deleted file mode 100644
index d4820c051ad72b..00000000000000
--- a/clang/tools/clang-format-vs/source.extension.vsixmanifest.in
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
- <Metadata>
- <Identity Id="3cb18a5e-97e9-11e7-abc4-cec278b6b50a" Version="@CLANG_FORMAT_VS_VERSION@" Language="en-US" Publisher="LLVM"/>
- <DisplayName>ClangFormat</DisplayName>
- <Description xml:space="preserve">A tool to format C/C++/Obj-C code.</Description>
- <MoreInfo>http://clang.llvm.org/docs/ClangFormat.html</MoreInfo>
- <License>license.txt</License>
- </Metadata>
- <Installation InstalledByMsi="false">
- <InstallationTarget Id="Microsoft.VisualStudio.Pro" Version="[11.0, 17.0)" />
- </Installation>
- <Dependencies>
- <Dependency Id="Microsoft.VisualStudio.MPF" MinVersion="11.0" DisplayName="Visual Studio MPF" />
- </Dependencies>
- <Prerequisites>
- <Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[11.0,)" DisplayName="Visual Studio core editor" />
- </Prerequisites>
-</PackageManifest>
>From 9f12a3457d3eb8b4e782f449322d32ac157da85b Mon Sep 17 00:00:00 2001
From: Hans Wennborg <hans at chromium.org>
Date: Thu, 12 Sep 2024 09:44:16 +0200
Subject: [PATCH 3/3] remove cmake reference
---
clang/tools/CMakeLists.txt | 1 -
1 file changed, 1 deletion(-)
diff --git a/clang/tools/CMakeLists.txt b/clang/tools/CMakeLists.txt
index 4885afc1584d01..f588a3634ee6bc 100644
--- a/clang/tools/CMakeLists.txt
+++ b/clang/tools/CMakeLists.txt
@@ -5,7 +5,6 @@ add_clang_subdirectory(driver)
add_clang_subdirectory(apinotes-test)
add_clang_subdirectory(clang-diff)
add_clang_subdirectory(clang-format)
-add_clang_subdirectory(clang-format-vs)
add_clang_subdirectory(clang-fuzzer)
add_clang_subdirectory(clang-import-test)
add_clang_subdirectory(clang-linker-wrapper)
More information about the cfe-commits
mailing list