Skip to content

[gardening][lib/Basic][C++11] Replace typedef with using #15169

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 1 commit into from
Mar 13, 2018
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
4 changes: 2 additions & 2 deletions lib/Basic/Mangler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ void Mangle::printManglingStats() {
}

llvm::outs() << "Mangling operator stats:\n";
typedef llvm::StringMapEntry<OpStatEntry> MapEntry;

using MapEntry = llvm::StringMapEntry<OpStatEntry>;
std::vector<const MapEntry *> SortedOpStats;
for (const MapEntry &ME : OpStats) {
SortedOpStats.push_back(&ME);
Expand Down
5 changes: 2 additions & 3 deletions lib/Basic/Statistic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,8 @@ class UnifiedStatsReporter::RecursionSafeTimers {
class StatsProfiler {
struct Node {
int64_t SelfCount;
typedef std::tuple<StringRef,
const void*,
const UnifiedStatsReporter::TraceFormatter*> Key;
using Key = std::tuple<StringRef, const void *,
const UnifiedStatsReporter::TraceFormatter *>;
Node *Parent;
DenseMap<Key, std::unique_ptr<Node>> Children;

Expand Down
2 changes: 1 addition & 1 deletion lib/Basic/StringExtras.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,7 @@ static bool isVacuousPreposition(StringRef beforePreposition,
}

namespace {
typedef std::reverse_iterator<camel_case::WordIterator> ReverseWordIterator;
using ReverseWordIterator = std::reverse_iterator<camel_case::WordIterator>;
} // end anonymous namespace

/// Find the last preposition in the given word.
Expand Down
2 changes: 1 addition & 1 deletion lib/Basic/TaskQueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void DummyTaskQueue::addTask(const char *ExecPath, ArrayRef<const char *> Args,
bool DummyTaskQueue::execute(TaskQueue::TaskBeganCallback Began,
TaskQueue::TaskFinishedCallback Finished,
TaskQueue::TaskSignalledCallback Signalled) {
typedef std::pair<ProcessId, std::unique_ptr<DummyTask>> PidTaskPair;
using PidTaskPair = std::pair<ProcessId, std::unique_ptr<DummyTask>>;
std::queue<PidTaskPair> ExecutingTasks;

bool SubtaskFailed = false;
Expand Down
2 changes: 1 addition & 1 deletion lib/Basic/Unix/TaskQueue.inc
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ void TaskQueue::addTask(const char *ExecPath, ArrayRef<const char *> Args,

bool TaskQueue::execute(TaskBeganCallback Began, TaskFinishedCallback Finished,
TaskSignalledCallback Signalled) {
typedef llvm::DenseMap<pid_t, std::unique_ptr<Task>> PidToTaskMap;
using PidToTaskMap = llvm::DenseMap<pid_t, std::unique_ptr<Task>>;

// Stores the current executing Tasks, organized by pid.
PidToTaskMap ExecutingTasks;
Expand Down