Skip to content

Commit 9c98ea0

Browse files
author
Valery N Dmitriev
committed
Merge branch 'intel' into private/sync_to_llvm_fc40cbd9d8_v2
Sync to LLVM fc40cbd Sync to SPIRV-LLVM-Translator 55f2041f2c Signed-off-by: Valery N Dmitriev <[email protected]>
2 parents cf94188 + c15e387 commit 9c98ea0

File tree

11,480 files changed

+463852
-207136
lines changed

Some content is hidden

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

11,480 files changed

+463852
-207136
lines changed

.gitignore

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#==============================================================================#
2+
# This file specifies intentionally untracked files that git should ignore.
3+
# See: http://www.kernel.org/pub/software/scm/git/docs/gitignore.html
4+
#
5+
# This file is intentionally different from the output of `git svn show-ignore`,
6+
# as most of those are useless.
7+
#==============================================================================#
8+
9+
#==============================================================================#
10+
# File extensions to be ignored anywhere in the tree.
11+
#==============================================================================#
12+
# Temp files created by most text editors.
13+
*~
14+
# Merge files created by git.
15+
*.orig
16+
# Byte compiled python modules.
17+
*.pyc
18+
# vim swap files
19+
.*.sw?
20+
.sw?
21+
#OS X specific files.
22+
.DS_store
23+
24+
# Nested build directory
25+
/build
26+
27+
#==============================================================================#
28+
# Explicit files to ignore (only matches one).
29+
#==============================================================================#
30+
# Various tag programs
31+
/tags
32+
/TAGS
33+
/GPATH
34+
/GRTAGS
35+
/GSYMS
36+
/GTAGS
37+
.gitusers
38+
autom4te.cache
39+
cscope.files
40+
cscope.out
41+
autoconf/aclocal.m4
42+
autoconf/autom4te.cache
43+
/compile_commands.json
44+
# Visual Studio built-in CMake configuration
45+
/CMakeSettings.json
46+
# CLion project configuration
47+
/.idea
48+
49+
#==============================================================================#
50+
# Directories to ignore (do not add trailing '/'s, they skip symlinks).
51+
#==============================================================================#
52+
# VS2017 and VSCode config files.
53+
.vscode
54+
.vs
55+
# clangd index
56+
.clangd

clang-tools-extra/CMakeLists.txt

+3-8
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
1-
option(CLANGD_BUILD_XPC "Build XPC Support For Clangd." OFF)
2-
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
3-
set(CLANGD_BUILD_XPC ON CACHE BOOL "" FORCE)
4-
endif ()
5-
61
add_subdirectory(clang-apply-replacements)
72
add_subdirectory(clang-reorder-fields)
83
add_subdirectory(modularize)
94
add_subdirectory(clang-tidy)
105
add_subdirectory(clang-tidy-vs)
116

12-
add_subdirectory(change-namespace)
7+
add_subdirectory(clang-change-namespace)
138
add_subdirectory(clang-doc)
14-
add_subdirectory(clang-query)
9+
add_subdirectory(clang-include-fixer)
1510
add_subdirectory(clang-move)
11+
add_subdirectory(clang-query)
1612
add_subdirectory(clangd)
17-
add_subdirectory(include-fixer)
1813
add_subdirectory(pp-trace)
1914
add_subdirectory(tool-template)
2015

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

+6-3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "clang/Format/Format.h"
2020
#include "clang/Lex/Lexer.h"
2121
#include "clang/Rewrite/Core/Rewriter.h"
22+
#include "clang/Tooling/Core/Diagnostic.h"
2223
#include "clang/Tooling/DiagnosticsYaml.h"
2324
#include "clang/Tooling/ReplacementsYaml.h"
2425
#include "llvm/ADT/ArrayRef.h"
@@ -169,9 +170,11 @@ groupReplacements(const TUReplacements &TUs, const TUDiagnostics &TUDs,
169170

170171
for (const auto &TU : TUDs)
171172
for (const auto &D : TU.Diagnostics)
172-
for (const auto &Fix : D.Fix)
173-
for (const tooling::Replacement &R : Fix.second)
174-
AddToGroup(R, true);
173+
if (const auto *ChoosenFix = tooling::selectFirstFix(D)) {
174+
for (const auto &Fix : *ChoosenFix)
175+
for (const tooling::Replacement &R : Fix.second)
176+
AddToGroup(R, true);
177+
}
175178

176179
// Sort replacements per file to keep consistent behavior when
177180
// clang-apply-replacements run on differents machine.

clang-tools-extra/clang-doc/tool/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
22

3-
add_clang_executable(clang-doc
3+
add_clang_tool(clang-doc
44
ClangDocMain.cpp
55
)
66

clang-tools-extra/include-fixer/FuzzySymbolIndex.h renamed to clang-tools-extra/clang-include-fixer/FuzzySymbolIndex.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ namespace include_fixer {
3131
// Implementations may choose to truncate results, refuse short queries, etc.
3232
class FuzzySymbolIndex : public SymbolIndex {
3333
public:
34-
// Loads the specified include-fixer database and returns an index serving it.
34+
// Loads the specified clang-include-fixer database and returns an index serving it.
3535
static llvm::Expected<std::unique_ptr<FuzzySymbolIndex>>
3636
createFromYAML(llvm::StringRef File);
3737

clang-tools-extra/include-fixer/IncludeFixer.cpp renamed to clang-tools-extra/clang-include-fixer/IncludeFixer.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include "llvm/Support/Debug.h"
1717
#include "llvm/Support/raw_ostream.h"
1818

19-
#define DEBUG_TYPE "include-fixer"
19+
#define DEBUG_TYPE "clang-include-fixer"
2020

2121
using namespace clang;
2222

@@ -348,8 +348,8 @@ IncludeFixerSemaSource::query(StringRef Query, StringRef ScopedQualifiers,
348348
//
349349
// We use conservative behavior for detecting the same unidentified symbol
350350
// here. The symbols which have the same ScopedQualifier and RawIdentifier
351-
// are considered equal. So that include-fixer avoids false positives, and
352-
// always adds missing qualifiers to correct symbols.
351+
// are considered equal. So that clang-include-fixer avoids false positives,
352+
// and always adds missing qualifiers to correct symbols.
353353
if (!GenerateDiagnostics && !QuerySymbolInfos.empty()) {
354354
if (ScopedQualifiers == QuerySymbolInfos.front().ScopedQualifiers &&
355355
Query == QuerySymbolInfos.front().RawIdentifier) {

clang-tools-extra/include-fixer/IncludeFixer.h renamed to clang-tools-extra/clang-include-fixer/IncludeFixer.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class IncludeFixerActionFactory : public clang::tooling::ToolAction {
6767
///
6868
/// \param Code The source code.
6969
/// \param Context The context which contains all information for creating
70-
/// include-fixer replacements.
70+
/// clang-include-fixer replacements.
7171
/// \param Style clang-format style being used.
7272
/// \param AddQualifiers Whether we should add qualifiers to all instances of
7373
/// an unidentified symbol.

clang-tools-extra/include-fixer/SymbolIndexManager.cpp renamed to clang-tools-extra/clang-include-fixer/SymbolIndexManager.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include "llvm/Support/Debug.h"
1414
#include "llvm/Support/Path.h"
1515

16-
#define DEBUG_TYPE "include-fixer"
16+
#define DEBUG_TYPE "clang-include-fixer"
1717

1818
namespace clang {
1919
namespace include_fixer {

clang-tools-extra/include-fixer/tool/ClangIncludeFixer.cpp renamed to clang-tools-extra/clang-include-fixer/tool/ClangIncludeFixer.cpp

+6-5
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,8 @@ int includeFixerMain(int argc, const char **argv) {
366366
}
367367

368368
// We leave an empty symbol range as we don't know the range of the symbol
369-
// being queried in this mode. include-fixer won't add namespace qualifiers
370-
// if the symbol range is empty, which also fits this case.
369+
// being queried in this mode. clang-include-fixer won't add namespace
370+
// qualifiers if the symbol range is empty, which also fits this case.
371371
IncludeFixerContext::QuerySymbolInfo Symbol;
372372
Symbol.RawIdentifier = QuerySymbol;
373373
auto Context =
@@ -383,9 +383,10 @@ int includeFixerMain(int argc, const char **argv) {
383383

384384
if (tool.run(&Factory) != 0) {
385385
// We suppress all Clang diagnostics (because they would be wrong,
386-
// include-fixer does custom recovery) but still want to give some feedback
387-
// in case there was a compiler error we couldn't recover from. The most
388-
// common case for this is a #include in the file that couldn't be found.
386+
// clang-include-fixer does custom recovery) but still want to give some
387+
// feedback in case there was a compiler error we couldn't recover from.
388+
// The most common case for this is a #include in the file that couldn't be
389+
// found.
389390
llvm::errs() << "Fatal compiler error occurred while parsing file!"
390391
" (incorrect include paths?)\n";
391392
return 1;

clang-tools-extra/include-fixer/tool/clang-include-fixer.el renamed to clang-tools-extra/clang-include-fixer/tool/clang-include-fixer.el

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
;; This package allows Emacs users to invoke the 'clang-include-fixer' within
99
;; Emacs. 'clang-include-fixer' provides an automated way of adding #include
1010
;; directives for missing symbols in one translation unit, see
11-
;; <http://clang.llvm.org/extra/include-fixer.html>.
11+
;; <http://clang.llvm.org/extra/clang-include-fixer.html>.
1212

1313
;;; Code:
1414

@@ -243,7 +243,7 @@ return nil. Buffer restrictions are ignored."
243243
t))))))))))))
244244

245245
(defun clang-include-fixer--add-header (stdout)
246-
"Analyse the result of include-fixer stored in STDOUT.
246+
"Analyse the result of clang-include-fixer stored in STDOUT.
247247
Add a missing header if there is any. If there are multiple
248248
possible headers the user can select one of them to be included.
249249
Temporarily highlight the affected symbols. Asynchronously call
@@ -317,7 +317,7 @@ They are replaced by the single element selected by the user."
317317
(when overlays
318318
(goto-char (clang-include-fixer--closest-overlay overlays)))
319319
(cl-flet ((header (info) (let-alist info .Header)))
320-
;; The header-infos is already sorted by include-fixer.
320+
;; The header-infos is already sorted by clang-include-fixer.
321321
(let* ((headers (mapcar #'header .HeaderInfos))
322322
(header (completing-read
323323
(clang-include-fixer--format-message

clang-tools-extra/include-fixer/tool/clang-include-fixer.py renamed to clang-tools-extra/clang-include-fixer/tool/clang-include-fixer.py

+8-6
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
# - Change 'binary' if clang-include-fixer is not on the path (see below).
33
# - Add to your .vimrc:
44
#
5-
# noremap <leader>cf :pyf path/to/llvm/source/tools/clang/tools/extra/include-fixer/tool/clang-include-fixer.py<cr>
5+
# noremap <leader>cf :pyf path/to/llvm/source/tools/clang/tools/extra/clang-include-fixer/tool/clang-include-fixer.py<cr>
66
#
7-
# This enables clang-include-fixer for NORMAL and VISUAL mode. Change "<leader>cf"
8-
# to another binding if you need clang-include-fixer on a different key.
7+
# This enables clang-include-fixer for NORMAL and VISUAL mode. Change
8+
# "<leader>cf" to another binding if you need clang-include-fixer on a
9+
# different key.
910
#
10-
# To set up clang-include-fixer, see http://clang.llvm.org/extra/include-fixer.html
11+
# To set up clang-include-fixer, see
12+
# http://clang.llvm.org/extra/clang-include-fixer.html
1113
#
1214
# With this integration you can press the bound key and clang-include-fixer will
1315
# be run on the current buffer.
@@ -76,7 +78,7 @@ def GetUserSelection(message, headers, maximum_suggested_headers):
7678
raise Exception()
7779
except Exception:
7880
# Show a new prompt on invalid option instead of aborting so that users
79-
# don't need to wait for another include-fixer run.
81+
# don't need to wait for another clang-include-fixer run.
8082
print >> sys.stderr, "Invalid option:", res
8183
return GetUserSelection(message, headers, maximum_suggested_headers)
8284
return headers[idx - 1]
@@ -170,7 +172,7 @@ def main():
170172
print "The file is fine, no need to add a header."
171173
return
172174
symbol = query_symbol_infos[0]["RawIdentifier"]
173-
# The header_infos is already sorted by include-fixer.
175+
# The header_infos is already sorted by clang-include-fixer.
174176
header_infos = include_fixer_context["HeaderInfos"]
175177
# Deduplicate headers while keeping the order, so that the same header would
176178
# not be suggested twice.

clang-tools-extra/clang-move/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set(LLVM_LINK_COMPONENTS
33
)
44

55
add_clang_library(clangMove
6-
ClangMove.cpp
6+
Move.cpp
77
HelperDeclRefGraph.cpp
88

99
LINK_LIBS

0 commit comments

Comments
 (0)