Skip to content

🌲Some final build fixes #67714

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/swift/Basic/BlotMapVector.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "llvm/ADT/DenseMap.h"
#include "swift/Basic/LLVM.h"
#include "swift/Basic/Range.h"
#include "llvm/ADT/Optional.h"
#include <vector>

namespace swift {
Expand Down
1 change: 1 addition & 0 deletions lib/Frontend/PrintingDiagnosticConsumer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cmath>

using namespace swift;
using namespace swift::markup;
Expand Down
19 changes: 0 additions & 19 deletions unittests/Basic/STLExtrasTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
//===----------------------------------------------------------------------===//

#include "swift/Basic/STLExtras.h"
#include "swift/Basic/LLVMExtras.h"
#include "gtest/gtest.h"

using namespace swift;
Expand Down Expand Up @@ -182,21 +181,3 @@ TEST(RemoveAdjacentIf, MultipleRuns) {
EXPECT_EQ(result, &items[0]);
}
}

TEST(SmallSetVector, operator_equals) {

struct EquatableThing {
int value;
bool operator==(EquatableThing other) {
return value == other.value;
}
};

struct NonEquatableThing {
int value;
bool operator==() = delete;
};

EXPECT_TRUE(isEquatable<EquatableThing>());
EXPECT_FALSE(isEquatable<NonEquatableThing>());
}
1 change: 1 addition & 0 deletions unittests/ClangImporter/ClangImporterTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "llvm/Support/Path.h"
#include "llvm/Support/VirtualOutputBackends.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/TargetParser/Host.h"
#include "gtest/gtest.h"

using namespace swift;
Expand Down
2 changes: 1 addition & 1 deletion unittests/DependencyScan/Features.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ testHasOption(llvm::opt::OptTable &table, options::ID id,
const std::unordered_set<std::string> &optionSet) {
if (table.getOption(id).hasFlag(swift::options::FrontendOption)) {
auto name = table.getOptionName(id);
if (strlen(name) > 0) {
if (!name.empty() && name[0] != '\0') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just due to the option changes again, !name.empty() here is fine IMO. I know a StringRef can contain \0 but it's not going to happen here.

auto nameStr = std::string(name);
bool setContainsOption = optionSet.find(nameStr) != optionSet.end();
EXPECT_EQ(setContainsOption, true) << "Missing Option: " << nameStr;
Expand Down
16 changes: 8 additions & 8 deletions unittests/Parse/BuildConfigTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ TEST_F(VersionTest, VersionComparison) {
EXPECT_GE(currentVersion, currentVersion);
EXPECT_GE(currentVersion, V("1.0").value());
EXPECT_GE(currentVersion, V("2").value());
EXPECT_FALSE(V("2.n").hasValue());
EXPECT_FALSE(V("").hasValue());
EXPECT_FALSE(V("\"2.0\"").hasValue());
EXPECT_FALSE(V("2..").hasValue());
EXPECT_FALSE(V(".").hasValue());
EXPECT_FALSE(V("..").hasValue());
EXPECT_TRUE(V("1.").hasValue());
EXPECT_FALSE(V(".1").hasValue());
EXPECT_FALSE(V("2.n").has_value());
EXPECT_FALSE(V("").has_value());
EXPECT_FALSE(V("\"2.0\"").has_value());
EXPECT_FALSE(V("2..").has_value());
EXPECT_FALSE(V(".").has_value());
EXPECT_FALSE(V("..").has_value());
EXPECT_TRUE(V("1.").has_value());
EXPECT_FALSE(V(".1").has_value());

}

Expand Down