Skip to content

Commit 4b2eddb

Browse files
authored
Merge pull request #656 from alexbatashev/private/aabader/pulldown
LLVM pulldown
2 parents 7865dfc + 822eb1c commit 4b2eddb

File tree

14,504 files changed

+671614
-458901
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

14,504 files changed

+671614
-458901
lines changed

.git-blame-ignore-revs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Since version 2.23 (released in August 2019), git-blame has a feature
2+
# to ignore or bypass certain commits.
3+
#
4+
# This file contains a list of commits that are not likely what you
5+
# are looking for in a blame, such as mass reformatting or renaming.
6+
# You can set this file as a default ignore file for blame by running
7+
# the following command.
8+
#
9+
# $ git config blame.ignoreRevsFile .git-blame-ignore-revs
10+
11+
# r365730: [Coding style change][lld] Rename variables for non-ELF ports
12+
136d27ab4de0c1d5dedfecc32a9857be78fa0648
13+
14+
# r365595: [Coding style change] Rename variables so that they start with a lowercase letter
15+
3837f4273fcc40cc519035479aefe78e5cbd3055
16+
17+
# r280751: [Coding style change][lldb] Moved LLDB code base to use LLVM style
18+
b9c1b51e45b845debb76d8658edabca70ca56079

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
.DS_store
2323

2424
# Nested build directory
25-
/build
25+
/build*
2626

2727
#==============================================================================#
2828
# Explicit files to ignore (only matches one).
@@ -53,4 +53,4 @@ autoconf/autom4te.cache
5353
.vscode
5454
.vs
5555
# clangd index
56-
.clangd
56+
.clangd

clang-tools-extra/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ add_subdirectory(clang-apply-replacements)
44
add_subdirectory(clang-reorder-fields)
55
add_subdirectory(modularize)
66
add_subdirectory(clang-tidy)
7-
add_subdirectory(clang-tidy-vs)
87

98
add_subdirectory(clang-change-namespace)
109
add_subdirectory(clang-doc)

clang-tools-extra/clang-apply-replacements/include/clang-apply-replacements/Tooling/ApplyReplacements.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//===----------------------------------------------------------------------===//
88
///
99
/// \file
10-
/// \brief This file provides the interface for deduplicating, detecting
10+
/// This file provides the interface for deduplicating, detecting
1111
/// conflicts in, and applying collections of Replacements.
1212
///
1313
//===----------------------------------------------------------------------===//
@@ -31,21 +31,21 @@ class Rewriter;
3131

3232
namespace replace {
3333

34-
/// \brief Collection of TranslationUnitReplacements.
34+
/// Collection of TranslationUnitReplacements.
3535
typedef std::vector<clang::tooling::TranslationUnitReplacements> TUReplacements;
3636

37-
/// \brief Collection of TranslationUnitReplacement files.
37+
/// Collection of TranslationUnitReplacement files.
3838
typedef std::vector<std::string> TUReplacementFiles;
3939

40-
/// \brief Collection of TranslationUniDiagnostics.
40+
/// Collection of TranslationUniDiagnostics.
4141
typedef std::vector<clang::tooling::TranslationUnitDiagnostics> TUDiagnostics;
4242

43-
/// \brief Map mapping file name to a set of AtomicChange targeting that file.
43+
/// Map mapping file name to a set of AtomicChange targeting that file.
4444
typedef llvm::DenseMap<const clang::FileEntry *,
4545
std::vector<tooling::AtomicChange>>
4646
FileToChangesMap;
4747

48-
/// \brief Recursively descends through a directory structure rooted at \p
48+
/// Recursively descends through a directory structure rooted at \p
4949
/// Directory and attempts to deserialize *.yaml files as
5050
/// TranslationUnitReplacements. All docs that successfully deserialize are
5151
/// added to \p TUs.
@@ -70,7 +70,7 @@ std::error_code collectReplacementsFromDirectory(
7070
const llvm::StringRef Directory, TUDiagnostics &TUs,
7171
TUReplacementFiles &TUFiles, clang::DiagnosticsEngine &Diagnostics);
7272

73-
/// \brief Deduplicate, check for conflicts, and extract all Replacements stored
73+
/// Deduplicate, check for conflicts, and extract all Replacements stored
7474
/// in \c TUs. Conflicting replacements are skipped.
7575
///
7676
/// \post For all (key,value) in FileChanges, value[i].getOffset() <=
@@ -90,7 +90,7 @@ bool mergeAndDeduplicate(const TUReplacements &TUs, const TUDiagnostics &TUDs,
9090
FileToChangesMap &FileChanges,
9191
clang::SourceManager &SM);
9292

93-
/// \brief Apply \c AtomicChange on File and rewrite it.
93+
/// Apply \c AtomicChange on File and rewrite it.
9494
///
9595
/// \param[in] File Path of the file where to apply AtomicChange.
9696
/// \param[in] Changes to apply.
@@ -104,7 +104,7 @@ applyChanges(StringRef File, const std::vector<tooling::AtomicChange> &Changes,
104104
const tooling::ApplyChangesSpec &Spec,
105105
DiagnosticsEngine &Diagnostics);
106106

107-
/// \brief Delete the replacement files.
107+
/// Delete the replacement files.
108108
///
109109
/// \param[in] Files Replacement files to delete.
110110
/// \param[in] Diagnostics DiagnosticsEngine used for error output.

clang-tools-extra/clang-apply-replacements/lib/Tooling/ApplyReplacements.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//===----------------------------------------------------------------------===//
88
///
99
/// \file
10-
/// \brief This file provides the implementation for deduplicating, detecting
10+
/// This file provides the implementation for deduplicating, detecting
1111
/// conflicts in, and applying collections of Replacements.
1212
///
1313
/// FIXME: Use Diagnostics for output instead of llvm::errs().
@@ -124,7 +124,7 @@ std::error_code collectReplacementsFromDirectory(
124124
return ErrorCode;
125125
}
126126

127-
/// \brief Extract replacements from collected TranslationUnitReplacements and
127+
/// Extract replacements from collected TranslationUnitReplacements and
128128
/// TranslationUnitDiagnostics and group them per file. Identical replacements
129129
/// from diagnostics are deduplicated.
130130
///
@@ -151,13 +151,13 @@ groupReplacements(const TUReplacements &TUs, const TUDiagnostics &TUDs,
151151
auto AddToGroup = [&](const tooling::Replacement &R, bool FromDiag) {
152152
// Use the file manager to deduplicate paths. FileEntries are
153153
// automatically canonicalized.
154-
if (const FileEntry *Entry = SM.getFileManager().getFile(R.getFilePath())) {
154+
if (auto Entry = SM.getFileManager().getFile(R.getFilePath())) {
155155
if (FromDiag) {
156-
auto &Replaces = DiagReplacements[Entry];
156+
auto &Replaces = DiagReplacements[*Entry];
157157
if (!Replaces.insert(R).second)
158158
return;
159159
}
160-
GroupedReplacements[Entry].push_back(R);
160+
GroupedReplacements[*Entry].push_back(R);
161161
} else if (Warned.insert(R.getFilePath()).second) {
162162
errs() << "Described file '" << R.getFilePath()
163163
<< "' doesn't exist. Ignoring...\n";

clang-tools-extra/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//===----------------------------------------------------------------------===//
88
///
99
/// \file
10-
/// \brief This file provides the main function for the
10+
/// This file provides the main function for the
1111
/// clang-apply-replacements tool.
1212
///
1313
//===----------------------------------------------------------------------===//
@@ -152,7 +152,7 @@ int main(int argc, char **argv) {
152152

153153
// Write new file to disk
154154
std::error_code EC;
155-
llvm::raw_fd_ostream FileStream(FileName, EC, llvm::sys::fs::F_None);
155+
llvm::raw_fd_ostream FileStream(FileName, EC, llvm::sys::fs::OF_None);
156156
if (EC) {
157157
llvm::errs() << "Could not open " << FileName << " for writing\n";
158158
continue;

clang-tools-extra/clang-change-namespace/ChangeNamespace.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ getLexerStartingFromLoc(SourceLocation Loc, const SourceManager &SM,
109109

110110
const char *TokBegin = File.data() + LocInfo.second;
111111
// Lex from the start of the given location.
112-
return llvm::make_unique<Lexer>(SM.getLocForStartOfFile(LocInfo.first),
112+
return std::make_unique<Lexer>(SM.getLocForStartOfFile(LocInfo.first),
113113
LangOpts, File.begin(), TokBegin, File.end());
114114
}
115115

clang-tools-extra/clang-change-namespace/tool/ClangChangeNamespace.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ int main(int argc, const char **argv) {
147147
for (auto I = ChangedFiles.begin(), E = ChangedFiles.end(); I != E; ++I) {
148148
OS << " {\n";
149149
OS << " \"FilePath\": \"" << *I << "\",\n";
150-
const auto *Entry = FileMgr.getFile(*I);
151-
auto ID = Sources.getOrCreateFileID(Entry, SrcMgr::C_User);
150+
const auto Entry = FileMgr.getFile(*I);
151+
auto ID = Sources.getOrCreateFileID(*Entry, SrcMgr::C_User);
152152
std::string Content;
153153
llvm::raw_string_ostream ContentStream(Content);
154154
Rewrite.getEditBuffer(ID).write(ContentStream);
@@ -165,9 +165,9 @@ int main(int argc, const char **argv) {
165165
}
166166

167167
for (const auto &File : ChangedFiles) {
168-
const auto *Entry = FileMgr.getFile(File);
168+
const auto Entry = FileMgr.getFile(File);
169169

170-
auto ID = Sources.getOrCreateFileID(Entry, SrcMgr::C_User);
170+
auto ID = Sources.getOrCreateFileID(*Entry, SrcMgr::C_User);
171171
outs() << "============== " << File << " ==============\n";
172172
Rewrite.getEditBuffer(ID).write(llvm::outs());
173173
outs() << "\n============================================\n";

0 commit comments

Comments
 (0)