Skip to content

Commit 151a0bb

Browse files
committed
Merge from 'main' to 'sycl-web' (#416)
CONFLICT (content): Merge conflict in llvm/lib/Support/Triple.cpp CONFLICT (content): Merge conflict in llvm/include/llvm/ADT/Triple.h
2 parents e2b359c + 8f00447 commit 151a0bb

File tree

3,122 files changed

+745629
-495073
lines changed

Some content is hidden

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

3,122 files changed

+745629
-495073
lines changed

clang-tools-extra/clang-tidy/ClangTidy.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,10 @@
2222
#include "ExpandModularHeadersPPCallbacks.h"
2323
#include "clang-tidy-config.h"
2424
#include "clang/AST/ASTConsumer.h"
25-
#include "clang/AST/ASTContext.h"
26-
#include "clang/AST/Decl.h"
2725
#include "clang/ASTMatchers/ASTMatchFinder.h"
2826
#include "clang/Format/Format.h"
2927
#include "clang/Frontend/ASTConsumers.h"
3028
#include "clang/Frontend/CompilerInstance.h"
31-
#include "clang/Frontend/FrontendActions.h"
3229
#include "clang/Frontend/FrontendDiagnostic.h"
3330
#include "clang/Frontend/MultiplexConsumer.h"
3431
#include "clang/Frontend/TextDiagnosticPrinter.h"
@@ -43,7 +40,6 @@
4340
#include "clang/Tooling/ReplacementsYaml.h"
4441
#include "clang/Tooling/Tooling.h"
4542
#include "llvm/Support/Process.h"
46-
#include "llvm/Support/Signals.h"
4743
#include <algorithm>
4844
#include <utility>
4945

clang-tools-extra/clang-tidy/ClangTidyCheck.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010
#include "llvm/ADT/SmallString.h"
1111
#include "llvm/ADT/StringRef.h"
1212
#include "llvm/Support/Error.h"
13-
#include "llvm/Support/WithColor.h"
1413
#include "llvm/Support/YAMLParser.h"
15-
#include "llvm/Support/raw_ostream.h"
1614

1715
namespace clang {
1816
namespace tidy {

clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,24 @@
2323
#include "clang/AST/Attr.h"
2424
#include "clang/Basic/Diagnostic.h"
2525
#include "clang/Basic/DiagnosticOptions.h"
26-
#include "clang/Basic/FileManager.h"
2726
#include "clang/Basic/SourceManager.h"
2827
#include "clang/Frontend/DiagnosticRenderer.h"
2928
#include "clang/Tooling/Core/Diagnostic.h"
3029
#include "clang/Tooling/Core/Replacement.h"
3130
#include "llvm/ADT/STLExtras.h"
3231
#include "llvm/ADT/SmallString.h"
3332
#include "llvm/ADT/StringMap.h"
34-
#include "llvm/Support/ErrorHandling.h"
3533
#include "llvm/Support/FormatVariadic.h"
3634
#include "llvm/Support/Regex.h"
3735
#include <tuple>
3836
#include <vector>
3937
using namespace clang;
4038
using namespace tidy;
4139

40+
#ifdef LLVM_CLANG_AST_ATTR_H
41+
//#error
42+
#endif
43+
4244
namespace {
4345
class ClangTidyDiagnosticRenderer : public DiagnosticRenderer {
4446
public:

clang-tools-extra/clang-tidy/ClangTidyModule.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@
1313
#include "llvm/ADT/StringMap.h"
1414
#include "llvm/ADT/StringRef.h"
1515
#include <functional>
16-
#include <map>
1716
#include <memory>
18-
#include <string>
1917

2018
namespace clang {
2119
namespace tidy {

clang-tools-extra/clang-tidy/ClangTidyOptions.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#include "llvm/Support/MemoryBufferRef.h"
1717
#include "llvm/Support/Path.h"
1818
#include "llvm/Support/YAMLTraits.h"
19-
#include "llvm/Support/raw_ostream.h"
2019
#include <utility>
2120

2221
#define DEBUG_TYPE "clang-tidy-options"
@@ -393,7 +392,7 @@ parseConfiguration(llvm::MemoryBufferRef Config) {
393392

394393
static void diagHandlerImpl(const llvm::SMDiagnostic &Diag, void *Ctx) {
395394
(*reinterpret_cast<DiagCallback *>(Ctx))(Diag);
396-
};
395+
}
397396

398397
llvm::ErrorOr<ClangTidyOptions>
399398
parseConfigurationWithDiags(llvm::MemoryBufferRef Config,

clang-tools-extra/clang-tidy/ClangTidyProfiling.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@
77
//===----------------------------------------------------------------------===//
88

99
#include "ClangTidyProfiling.h"
10-
#include "llvm/ADT/STLExtras.h"
1110
#include "llvm/ADT/SmallString.h"
1211
#include "llvm/Support/FileSystem.h"
1312
#include "llvm/Support/Path.h"
14-
#include "llvm/Support/YAMLTraits.h"
1513
#include "llvm/Support/raw_ostream.h"
1614
#include <system_error>
1715
#include <utility>

clang-tools-extra/clangd/CodeComplete.cpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,18 @@ struct CompletionCandidate {
182182
// strings (literal or URI) mapping to the same file. We still want to
183183
// bundle those, so we must resolve the header to be included here.
184184
std::string HeaderForHash;
185-
if (Inserter)
186-
if (auto Header = headerToInsertIfAllowed(Opts))
187-
if (auto HeaderFile = toHeaderFile(*Header, FileName))
185+
if (Inserter) {
186+
if (auto Header = headerToInsertIfAllowed(Opts)) {
187+
if (auto HeaderFile = toHeaderFile(*Header, FileName)) {
188188
if (auto Spelled =
189189
Inserter->calculateIncludePath(*HeaderFile, FileName))
190190
HeaderForHash = *Spelled;
191+
} else {
192+
vlog("Code completion header path manipulation failed {0}",
193+
HeaderFile.takeError());
194+
}
195+
}
196+
}
191197

192198
llvm::SmallString<256> Scratch;
193199
if (IndexResult) {

clang-tools-extra/clangd/GlobalCompilationDatabase.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -511,11 +511,14 @@ void DirectoryBasedGlobalCompilationDatabase::broadcastCDB(
511511
// Given that we know that CDBs have been moved/generated, don't trust caches.
512512
// (This should be rare, so it's OK to add a little latency).
513513
constexpr auto IgnoreCache = std::chrono::steady_clock::time_point::max();
514-
for (DirectoryCache *Dir : getDirectoryCaches(FileAncestors)) {
514+
auto DirectoryCaches = getDirectoryCaches(FileAncestors);
515+
assert(DirectoryCaches.size() == FileAncestors.size());
516+
for (unsigned I = 0; I < DirectoryCaches.size(); ++I) {
515517
bool ShouldBroadcast = false;
516-
if (Dir->get(Opts.TFS, ShouldBroadcast, /*FreshTime=*/IgnoreCache,
517-
/*FreshTimeMissing=*/IgnoreCache))
518-
DirectoryHasCDB.find(Dir->Path)->setValue(true);
518+
if (DirectoryCaches[I]->get(Opts.TFS, ShouldBroadcast,
519+
/*FreshTime=*/IgnoreCache,
520+
/*FreshTimeMissing=*/IgnoreCache))
521+
DirectoryHasCDB.find(FileAncestors[I])->setValue(true);
519522
}
520523

521524
std::vector<std::string> GovernedFiles;

clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-macro-usage-custom.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// FIXME: PR48646
2+
// UNSUPPORTED: system-windows
3+
14
// RUN: %check_clang_tidy %s cppcoreguidelines-macro-usage %t \
25
// RUN: -config='{CheckOptions: \
36
// RUN: [{key: cppcoreguidelines-macro-usage.AllowedRegexp, value: "DEBUG_*|TEST_*"}]}' --

clang-tools-extra/test/clang-tidy/checkers/readability-identifier-naming-ignored-regexp.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// FIXME: PR48646
2+
// UNSUPPORTED: system-windows
3+
14
// RUN: %check_clang_tidy %s readability-identifier-naming %t -- \
25
// RUN: -config='{CheckOptions: [ \
36
// RUN: {key: readability-identifier-naming.ParameterCase, value: CamelCase}, \

0 commit comments

Comments
 (0)