[clang-tools-extra] r366304 - Replace CRLF with LF.
Rui Ueyama via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 17 01:31:53 PDT 2019
Author: ruiu
Date: Wed Jul 17 01:31:51 2019
New Revision: 366304
URL: http://llvm.org/viewvc/llvm-project?rev=366304&view=rev
Log:
Replace CRLF with LF.
Modified:
clang-tools-extra/trunk/unittests/clang-tidy/ClangTidyDiagnosticConsumerTest.cpp
Modified: clang-tools-extra/trunk/unittests/clang-tidy/ClangTidyDiagnosticConsumerTest.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/unittests/clang-tidy/ClangTidyDiagnosticConsumerTest.cpp?rev=366304&r1=366303&r2=366304&view=diff
==============================================================================
--- clang-tools-extra/trunk/unittests/clang-tidy/ClangTidyDiagnosticConsumerTest.cpp (original)
+++ clang-tools-extra/trunk/unittests/clang-tidy/ClangTidyDiagnosticConsumerTest.cpp Wed Jul 17 01:31:51 2019
@@ -1,94 +1,94 @@
-#include "ClangTidy.h"
-#include "ClangTidyTest.h"
-#include "gtest/gtest.h"
-
-namespace clang {
-namespace tidy {
-namespace test {
-
-class TestCheck : public ClangTidyCheck {
-public:
- TestCheck(StringRef Name, ClangTidyContext *Context)
- : ClangTidyCheck(Name, Context) {}
- void registerMatchers(ast_matchers::MatchFinder *Finder) override {
- Finder->addMatcher(ast_matchers::varDecl().bind("var"), this);
- }
- void check(const ast_matchers::MatchFinder::MatchResult &Result) override {
- const auto *Var = Result.Nodes.getNodeAs<VarDecl>("var");
- // Add diagnostics in the wrong order.
- diag(Var->getLocation(), "variable");
- diag(Var->getTypeSpecStartLoc(), "type specifier");
- }
-};
-
-TEST(ClangTidyDiagnosticConsumer, SortsErrors) {
- std::vector<ClangTidyError> Errors;
- runCheckOnCode<TestCheck>("int a;", &Errors);
- EXPECT_EQ(2ul, Errors.size());
- EXPECT_EQ("type specifier", Errors[0].Message.Message);
- EXPECT_EQ("variable", Errors[1].Message.Message);
-}
-
-TEST(GlobList, Empty) {
- GlobList Filter("");
-
- EXPECT_TRUE(Filter.contains(""));
- EXPECT_FALSE(Filter.contains("aaa"));
-}
-
-TEST(GlobList, Nothing) {
- GlobList Filter("-*");
-
- EXPECT_FALSE(Filter.contains(""));
- EXPECT_FALSE(Filter.contains("a"));
- EXPECT_FALSE(Filter.contains("-*"));
- EXPECT_FALSE(Filter.contains("-"));
- EXPECT_FALSE(Filter.contains("*"));
-}
-
-TEST(GlobList, Everything) {
- GlobList Filter("*");
-
- EXPECT_TRUE(Filter.contains(""));
- EXPECT_TRUE(Filter.contains("aaaa"));
- EXPECT_TRUE(Filter.contains("-*"));
- EXPECT_TRUE(Filter.contains("-"));
- EXPECT_TRUE(Filter.contains("*"));
-}
-
-TEST(GlobList, Simple) {
- GlobList Filter("aaa");
-
- EXPECT_TRUE(Filter.contains("aaa"));
- EXPECT_FALSE(Filter.contains(""));
- EXPECT_FALSE(Filter.contains("aa"));
- EXPECT_FALSE(Filter.contains("aaaa"));
- EXPECT_FALSE(Filter.contains("bbb"));
-}
-
-TEST(GlobList, WhitespacesAtBegin) {
- GlobList Filter("-*, a.b.*");
-
- EXPECT_TRUE(Filter.contains("a.b.c"));
- EXPECT_FALSE(Filter.contains("b.c"));
-}
-
-TEST(GlobList, Complex) {
- GlobList Filter("*,-a.*, -b.*, \r \n a.1.* ,-a.1.A.*,-..,-...,-..+,-*$, -*qwe* ");
-
- EXPECT_TRUE(Filter.contains("aaa"));
- EXPECT_TRUE(Filter.contains("qqq"));
- EXPECT_FALSE(Filter.contains("a."));
- EXPECT_FALSE(Filter.contains("a.b"));
- EXPECT_FALSE(Filter.contains("b."));
- EXPECT_FALSE(Filter.contains("b.b"));
- EXPECT_TRUE(Filter.contains("a.1.b"));
- EXPECT_FALSE(Filter.contains("a.1.A.a"));
- EXPECT_FALSE(Filter.contains("qwe"));
- EXPECT_FALSE(Filter.contains("asdfqweasdf"));
- EXPECT_TRUE(Filter.contains("asdfqwEasdf"));
-}
-
-} // namespace test
-} // namespace tidy
-} // namespace clang
+#include "ClangTidy.h"
+#include "ClangTidyTest.h"
+#include "gtest/gtest.h"
+
+namespace clang {
+namespace tidy {
+namespace test {
+
+class TestCheck : public ClangTidyCheck {
+public:
+ TestCheck(StringRef Name, ClangTidyContext *Context)
+ : ClangTidyCheck(Name, Context) {}
+ void registerMatchers(ast_matchers::MatchFinder *Finder) override {
+ Finder->addMatcher(ast_matchers::varDecl().bind("var"), this);
+ }
+ void check(const ast_matchers::MatchFinder::MatchResult &Result) override {
+ const auto *Var = Result.Nodes.getNodeAs<VarDecl>("var");
+ // Add diagnostics in the wrong order.
+ diag(Var->getLocation(), "variable");
+ diag(Var->getTypeSpecStartLoc(), "type specifier");
+ }
+};
+
+TEST(ClangTidyDiagnosticConsumer, SortsErrors) {
+ std::vector<ClangTidyError> Errors;
+ runCheckOnCode<TestCheck>("int a;", &Errors);
+ EXPECT_EQ(2ul, Errors.size());
+ EXPECT_EQ("type specifier", Errors[0].Message.Message);
+ EXPECT_EQ("variable", Errors[1].Message.Message);
+}
+
+TEST(GlobList, Empty) {
+ GlobList Filter("");
+
+ EXPECT_TRUE(Filter.contains(""));
+ EXPECT_FALSE(Filter.contains("aaa"));
+}
+
+TEST(GlobList, Nothing) {
+ GlobList Filter("-*");
+
+ EXPECT_FALSE(Filter.contains(""));
+ EXPECT_FALSE(Filter.contains("a"));
+ EXPECT_FALSE(Filter.contains("-*"));
+ EXPECT_FALSE(Filter.contains("-"));
+ EXPECT_FALSE(Filter.contains("*"));
+}
+
+TEST(GlobList, Everything) {
+ GlobList Filter("*");
+
+ EXPECT_TRUE(Filter.contains(""));
+ EXPECT_TRUE(Filter.contains("aaaa"));
+ EXPECT_TRUE(Filter.contains("-*"));
+ EXPECT_TRUE(Filter.contains("-"));
+ EXPECT_TRUE(Filter.contains("*"));
+}
+
+TEST(GlobList, Simple) {
+ GlobList Filter("aaa");
+
+ EXPECT_TRUE(Filter.contains("aaa"));
+ EXPECT_FALSE(Filter.contains(""));
+ EXPECT_FALSE(Filter.contains("aa"));
+ EXPECT_FALSE(Filter.contains("aaaa"));
+ EXPECT_FALSE(Filter.contains("bbb"));
+}
+
+TEST(GlobList, WhitespacesAtBegin) {
+ GlobList Filter("-*, a.b.*");
+
+ EXPECT_TRUE(Filter.contains("a.b.c"));
+ EXPECT_FALSE(Filter.contains("b.c"));
+}
+
+TEST(GlobList, Complex) {
+ GlobList Filter("*,-a.*, -b.*, \r \n a.1.* ,-a.1.A.*,-..,-...,-..+,-*$, -*qwe* ");
+
+ EXPECT_TRUE(Filter.contains("aaa"));
+ EXPECT_TRUE(Filter.contains("qqq"));
+ EXPECT_FALSE(Filter.contains("a."));
+ EXPECT_FALSE(Filter.contains("a.b"));
+ EXPECT_FALSE(Filter.contains("b."));
+ EXPECT_FALSE(Filter.contains("b.b"));
+ EXPECT_TRUE(Filter.contains("a.1.b"));
+ EXPECT_FALSE(Filter.contains("a.1.A.a"));
+ EXPECT_FALSE(Filter.contains("qwe"));
+ EXPECT_FALSE(Filter.contains("asdfqweasdf"));
+ EXPECT_TRUE(Filter.contains("asdfqwEasdf"));
+}
+
+} // namespace test
+} // namespace tidy
+} // namespace clang
More information about the cfe-commits
mailing list