Skip to content

Commit

Permalink
Propagate pulldown into intel
Browse files Browse the repository at this point in the history
Signed-off-by: Vladimir Lazarev <[email protected]>
  • Loading branch information
vladimirlaz committed May 14, 2019
2 parents aad7113 + e5aaaf7 commit 83d6539
Show file tree
Hide file tree
Showing 9,778 changed files with 375,700 additions and 149,535 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
56 changes: 56 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#==============================================================================#
# This file specifies intentionally untracked files that git should ignore.
# See: http://www.kernel.org/pub/software/scm/git/docs/gitignore.html
#
# This file is intentionally different from the output of `git svn show-ignore`,
# as most of those are useless.
#==============================================================================#

#==============================================================================#
# File extensions to be ignored anywhere in the tree.
#==============================================================================#
# Temp files created by most text editors.
*~
# Merge files created by git.
*.orig
# Byte compiled python modules.
*.pyc
# vim swap files
.*.sw?
.sw?
#OS X specific files.
.DS_store

# Nested build directory
/build

#==============================================================================#
# Explicit files to ignore (only matches one).
#==============================================================================#
# Various tag programs
/tags
/TAGS
/GPATH
/GRTAGS
/GSYMS
/GTAGS
.gitusers
autom4te.cache
cscope.files
cscope.out
autoconf/aclocal.m4
autoconf/autom4te.cache
/compile_commands.json
# Visual Studio built-in CMake configuration
/CMakeSettings.json
# CLion project configuration
/.idea

#==============================================================================#
# Directories to ignore (do not add trailing '/'s, they skip symlinks).
#==============================================================================#
# VS2017 and VSCode config files.
.vscode
.vs
# clangd index
.clangd
9 changes: 2 additions & 7 deletions clang-tools-extra/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
option(CLANGD_BUILD_XPC "Build XPC Support For Clangd." OFF)
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(CLANGD_BUILD_XPC ON CACHE BOOL "" FORCE)
endif ()

add_subdirectory(clang-apply-replacements)
add_subdirectory(clang-reorder-fields)
add_subdirectory(modularize)
Expand All @@ -11,10 +6,10 @@ add_subdirectory(clang-tidy-vs)

add_subdirectory(clang-change-namespace)
add_subdirectory(clang-doc)
add_subdirectory(clang-query)
add_subdirectory(clang-include-fixer)
add_subdirectory(clang-move)
add_subdirectory(clang-query)
add_subdirectory(clangd)
add_subdirectory(include-fixer)
add_subdirectory(pp-trace)
add_subdirectory(tool-template)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "clang/Format/Format.h"
#include "clang/Lex/Lexer.h"
#include "clang/Rewrite/Core/Rewriter.h"
#include "clang/Tooling/Core/Diagnostic.h"
#include "clang/Tooling/DiagnosticsYaml.h"
#include "clang/Tooling/ReplacementsYaml.h"
#include "llvm/ADT/ArrayRef.h"
Expand Down Expand Up @@ -169,9 +170,11 @@ groupReplacements(const TUReplacements &TUs, const TUDiagnostics &TUDs,

for (const auto &TU : TUDs)
for (const auto &D : TU.Diagnostics)
for (const auto &Fix : D.Fix)
for (const tooling::Replacement &R : Fix.second)
AddToGroup(R, true);
if (const auto *ChoosenFix = tooling::selectFirstFix(D)) {
for (const auto &Fix : *ChoosenFix)
for (const tooling::Replacement &R : Fix.second)
AddToGroup(R, true);
}

// Sort replacements per file to keep consistent behavior when
// clang-apply-replacements run on differents machine.
Expand Down
2 changes: 1 addition & 1 deletion clang-tools-extra/clang-doc/tool/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)

add_clang_executable(clang-doc
add_clang_tool(clang-doc
ClangDocMain.cpp
)

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"

#define DEBUG_TYPE "include-fixer"
#define DEBUG_TYPE "clang-include-fixer"

using namespace clang;

Expand Down Expand Up @@ -348,8 +348,8 @@ IncludeFixerSemaSource::query(StringRef Query, StringRef ScopedQualifiers,
//
// We use conservative behavior for detecting the same unidentified symbol
// here. The symbols which have the same ScopedQualifier and RawIdentifier
// are considered equal. So that include-fixer avoids false positives, and
// always adds missing qualifiers to correct symbols.
// are considered equal. So that clang-include-fixer avoids false positives,
// and always adds missing qualifiers to correct symbols.
if (!GenerateDiagnostics && !QuerySymbolInfos.empty()) {
if (ScopedQualifiers == QuerySymbolInfos.front().ScopedQualifiers &&
Query == QuerySymbolInfos.front().RawIdentifier) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class IncludeFixerActionFactory : public clang::tooling::ToolAction {
///
/// \param Code The source code.
/// \param Context The context which contains all information for creating
/// include-fixer replacements.
/// clang-include-fixer replacements.
/// \param Style clang-format style being used.
/// \param AddQualifiers Whether we should add qualifiers to all instances of
/// an unidentified symbol.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "llvm/Support/Debug.h"
#include "llvm/Support/Path.h"

#define DEBUG_TYPE "include-fixer"
#define DEBUG_TYPE "clang-include-fixer"

namespace clang {
namespace include_fixer {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,8 @@ int includeFixerMain(int argc, const char **argv) {
}

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

if (tool.run(&Factory) != 0) {
// We suppress all Clang diagnostics (because they would be wrong,
// include-fixer does custom recovery) but still want to give some feedback
// in case there was a compiler error we couldn't recover from. The most
// common case for this is a #include in the file that couldn't be found.
// clang-include-fixer does custom recovery) but still want to give some
// feedback in case there was a compiler error we couldn't recover from.
// The most common case for this is a #include in the file that couldn't be
// found.
llvm::errs() << "Fatal compiler error occurred while parsing file!"
" (incorrect include paths?)\n";
return 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
;; This package allows Emacs users to invoke the 'clang-include-fixer' within
;; Emacs. 'clang-include-fixer' provides an automated way of adding #include
;; directives for missing symbols in one translation unit, see
;; <http://clang.llvm.org/extra/include-fixer.html>.
;; <http://clang.llvm.org/extra/clang-include-fixer.html>.

;;; Code:

Expand Down Expand Up @@ -243,7 +243,7 @@ return nil. Buffer restrictions are ignored."
t))))))))))))

(defun clang-include-fixer--add-header (stdout)
"Analyse the result of include-fixer stored in STDOUT.
"Analyse the result of clang-include-fixer stored in STDOUT.
Add a missing header if there is any. If there are multiple
possible headers the user can select one of them to be included.
Temporarily highlight the affected symbols. Asynchronously call
Expand Down Expand Up @@ -317,7 +317,7 @@ They are replaced by the single element selected by the user."
(when overlays
(goto-char (clang-include-fixer--closest-overlay overlays)))
(cl-flet ((header (info) (let-alist info .Header)))
;; The header-infos is already sorted by include-fixer.
;; The header-infos is already sorted by clang-include-fixer.
(let* ((headers (mapcar #'header .HeaderInfos))
(header (completing-read
(clang-include-fixer--format-message
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
# - Change 'binary' if clang-include-fixer is not on the path (see below).
# - Add to your .vimrc:
#
# noremap <leader>cf :pyf path/to/llvm/source/tools/clang/tools/extra/include-fixer/tool/clang-include-fixer.py<cr>
# noremap <leader>cf :pyf path/to/llvm/source/tools/clang/tools/extra/clang-include-fixer/tool/clang-include-fixer.py<cr>
#
# This enables clang-include-fixer for NORMAL and VISUAL mode. Change "<leader>cf"
# to another binding if you need clang-include-fixer on a different key.
# This enables clang-include-fixer for NORMAL and VISUAL mode. Change
# "<leader>cf" to another binding if you need clang-include-fixer on a
# different key.
#
# To set up clang-include-fixer, see http://clang.llvm.org/extra/include-fixer.html
# To set up clang-include-fixer, see
# http://clang.llvm.org/extra/clang-include-fixer.html
#
# With this integration you can press the bound key and clang-include-fixer will
# be run on the current buffer.
Expand Down Expand Up @@ -76,7 +78,7 @@ def GetUserSelection(message, headers, maximum_suggested_headers):
raise Exception()
except Exception:
# Show a new prompt on invalid option instead of aborting so that users
# don't need to wait for another include-fixer run.
# don't need to wait for another clang-include-fixer run.
print >> sys.stderr, "Invalid option:", res
return GetUserSelection(message, headers, maximum_suggested_headers)
return headers[idx - 1]
Expand Down Expand Up @@ -170,7 +172,7 @@ def main():
print "The file is fine, no need to add a header."
return
symbol = query_symbol_infos[0]["RawIdentifier"]
# The header_infos is already sorted by include-fixer.
# The header_infos is already sorted by clang-include-fixer.
header_infos = include_fixer_context["HeaderInfos"]
# Deduplicate headers while keeping the order, so that the same header would
# not be suggested twice.
Expand Down
2 changes: 1 addition & 1 deletion clang-tools-extra/clang-move/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set(LLVM_LINK_COMPONENTS
)

add_clang_library(clangMove
ClangMove.cpp
Move.cpp
HelperDeclRefGraph.cpp

LINK_LIBS
Expand Down
Loading

0 comments on commit 83d6539

Please sign in to comment.