From 8c9a7d7c41b07dce6e60feb7e0c7d7633ed7a2c5 Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Wed, 7 Sep 2016 19:41:19 +0000 Subject: [PATCH] Fix a few oversights in the clang-tidy VS plugin. Over-zealous cleanup of using statements removed some that were actually needed. Also cleaned up a few warnings. llvm-svn: 280844 --- clang-tools-extra/clang-tidy-vs/ClangTidy/CheckDatabase.cs | 2 +- clang-tools-extra/clang-tidy-vs/ClangTidy/CheckTree.cs | 1 + clang-tools-extra/clang-tidy-vs/ClangTidy/ClangTidyProperties.cs | 1 - clang-tools-extra/clang-tidy-vs/ClangTidy/ClangTidyPropertyGrid.cs | 7 ------- 4 files changed, 2 insertions(+), 9 deletions(-) diff --git a/clang-tools-extra/clang-tidy-vs/ClangTidy/CheckDatabase.cs b/clang-tools-extra/clang-tidy-vs/ClangTidy/CheckDatabase.cs index 3cf8efc..6b76688 100644 --- a/clang-tools-extra/clang-tidy-vs/ClangTidy/CheckDatabase.cs +++ b/clang-tools-extra/clang-tidy-vs/ClangTidy/CheckDatabase.cs @@ -50,7 +50,7 @@ namespace LLVM.ClangTidy foreach (var Check in Checks_) { if (Names.Contains(Check.Name)) - throw new ArgumentException(String.Format("Check {0} exists more than once!", Check.Name)); + continue; Names.Add(Check.Name); } } diff --git a/clang-tools-extra/clang-tidy-vs/ClangTidy/CheckTree.cs b/clang-tools-extra/clang-tidy-vs/ClangTidy/CheckTree.cs index ab746fe..f3e2583 100644 --- a/clang-tools-extra/clang-tidy-vs/ClangTidy/CheckTree.cs +++ b/clang-tools-extra/clang-tidy-vs/ClangTidy/CheckTree.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.ComponentModel; +using System.Linq; using System.Text; namespace LLVM.ClangTidy diff --git a/clang-tools-extra/clang-tidy-vs/ClangTidy/ClangTidyProperties.cs b/clang-tools-extra/clang-tidy-vs/ClangTidy/ClangTidyProperties.cs index ac83121..c6597c1 100644 --- a/clang-tools-extra/clang-tidy-vs/ClangTidy/ClangTidyProperties.cs +++ b/clang-tools-extra/clang-tidy-vs/ClangTidy/ClangTidyProperties.cs @@ -40,7 +40,6 @@ namespace LLVM.ClangTidy static ClangTidyProperties() { RootProperties_ = new ClangTidyProperties(null); - PropertyDescriptor D; } public static ClangTidyProperties RootProperties diff --git a/clang-tools-extra/clang-tidy-vs/ClangTidy/ClangTidyPropertyGrid.cs b/clang-tools-extra/clang-tidy-vs/ClangTidy/ClangTidyPropertyGrid.cs index c6d9370..20c8a8f 100644 --- a/clang-tools-extra/clang-tidy-vs/ClangTidy/ClangTidyPropertyGrid.cs +++ b/clang-tools-extra/clang-tidy-vs/ClangTidy/ClangTidyPropertyGrid.cs @@ -42,13 +42,6 @@ namespace LLVM.ClangTidy /// List> PropertyChain_ = null; - /// - /// A tree representing all the checks that the extension knows about, used - /// when serializing a file to intelligently determine when to use wildcard - /// include / exclude rules. - /// - CheckTree Checks_; - public ClangTidyPropertyGrid() { InitializeComponent(); -- 2.7.4