SuccessChanges

Summary

  1. [clang-tidy] Fix relative path in header-filter. Summary: Clang-tidy supports output diagnostics from header files if user specifies --header-filter. But it can't handle relative path well. For example, the folder structure of a project is: ``` // a.h is in /src/a/a.h // b.h is in /src/b/b.h ... // c.cpp is in /src/c.cpp ``` Now, we set --header-filter as --header-filter=/a/. That means we only want to check header files under /src/a/ path, and ignore header files uder /src/b/ path, but in current implementation, clang-tidy will check /src/b/b.h also, because the name of b.h used in clang-tidy is /src/a/../b/b.h. This change tries to fix this issue. Reviewers: alexfh, hokein, aaron.ballman, gribozavr Reviewed By: gribozavr Subscribers: MyDeveloperDay, xazax.hun, cfe-commits Tags: #clang, #clang-tools-extra Differential Revision: https://reviews.llvm.org/D67501 Patch by Yubo Xie.
  2. [SystemZ] Add SystemZ as supporting target in help text for -mfentry. => "Insert calls to fentry at function entry (x86/SystemZ only)" Review: Ulrich Weigand
  3. [StaticAnalyzer] Use llvm::StringLiteral instead of StringRef in few places StringRef's constexpr constructor seems to be extremely slow in MSVC 2017, so don't use it for generated tables. Should make PR43369 a bit better, no functionality change.
  4. [AMDGPU] Use std::make_tuple to make some toolchains happy again My toolchain stopped working (LLVM 8.0 , libstdc++ 5.4.0) after r372338. The same problem was seen in clang-cuda-build buildbots: clang-cuda-build/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp:763:12: error: chosen constructor is explicit in copy-initialization return {Reg, 0, nullptr}; ^~~~~~~~~~~~~~~~~ /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/tuple:479:19: note: explicit constructor declared here constexpr tuple(_UElements&&... __elements) ^ This commit adds explicit calls to std::make_tuple to work around the problem.
  5. Revert r372366 "Use getTargetConstant for BLENDI, and add a test to catch it." This reverts commit 52621307bcab2013e8833f3317cebd63a6db3885. Tests have been failing all night with [0/2] ACTION //llvm/test:check-llvm(//llvm/utils/gn/build/toolchain:unix) -- Testing: 33647 tests, 64 threads -- Testing: 0 .. 10.. UNRESOLVED: LLVM :: CodeGen/AMDGPU/GlobalISel/isel-blendi-gettargetconstant.ll (6943 of 33647) ******************** TEST 'LLVM :: CodeGen/AMDGPU/GlobalISel/isel-blendi-gettargetconstant.ll' FAILED ******************** Test has no run line! ******************** Since there were other concerns on https://reviews.llvm.org/D67785, I'm just reverting for now.
Revision 372388 by gribozavr:
[clang-tidy] Fix relative path in header-filter.

Summary:
Clang-tidy supports output diagnostics from header files if user
specifies --header-filter. But it can't handle relative path well.
For example, the folder structure of a project is:

```
// a.h is in /src/a/a.h

// b.h is in /src/b/b.h
...

// c.cpp is in /src/c.cpp

```

Now, we set --header-filter as --header-filter=/a/. That means we only
want to check header files under /src/a/ path, and ignore header files
uder /src/b/ path, but in current implementation, clang-tidy will check
/src/b/b.h also, because the name of b.h used in clang-tidy is
/src/a/../b/b.h.

This change tries to fix this issue.

Reviewers: alexfh, hokein, aaron.ballman, gribozavr

Reviewed By: gribozavr

Subscribers: MyDeveloperDay, xazax.hun, cfe-commits

Tags: #clang, #clang-tools-extra

Differential Revision: https://reviews.llvm.org/D67501

Patch by Yubo Xie.
Change TypePath in RepositoryPath in Workspace
The file was modified/clang-tools-extra/trunk/clang-tidy/ClangTidyDiagnosticConsumer.cpp (diff)clang-tools-extra.src/clang-tidy/ClangTidyDiagnosticConsumer.cpp
The file was added/clang-tools-extra/trunk/test/clang-tidy/Inputs/file-filter/subfolder_aclang-tools-extra.src/test/clang-tidy/Inputs/file-filter/subfolder_a
The file was added/clang-tools-extra/trunk/test/clang-tidy/Inputs/file-filter/subfolder_a/header_a.hclang-tools-extra.src/test/clang-tidy/Inputs/file-filter/subfolder_a/header_a.h
The file was added/clang-tools-extra/trunk/test/clang-tidy/Inputs/file-filter/subfolder_bclang-tools-extra.src/test/clang-tidy/Inputs/file-filter/subfolder_b
The file was added/clang-tools-extra/trunk/test/clang-tidy/Inputs/file-filter/subfolder_b/header_b.hclang-tools-extra.src/test/clang-tidy/Inputs/file-filter/subfolder_b/header_b.h
The file was added/clang-tools-extra/trunk/test/clang-tidy/Inputs/file-filter/subfolder_cclang-tools-extra.src/test/clang-tidy/Inputs/file-filter/subfolder_c
The file was added/clang-tools-extra/trunk/test/clang-tidy/Inputs/file-filter/subfolder_c/header_c.hclang-tools-extra.src/test/clang-tidy/Inputs/file-filter/subfolder_c/header_c.h
The file was modified/clang-tools-extra/trunk/test/clang-tidy/file-filter.cpp (diff)clang-tools-extra.src/test/clang-tidy/file-filter.cpp
Revision 372387 by jonpa:
[SystemZ]  Add SystemZ as supporting target in help text for -mfentry.

=> "Insert calls to fentry at function entry (x86/SystemZ only)"

Review: Ulrich Weigand
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/docs/ClangCommandLineReference.rst (diff)clang.src/docs/ClangCommandLineReference.rst
The file was modified/cfe/trunk/include/clang/Driver/Options.td (diff)clang.src/include/clang/Driver/Options.td
Revision 372386 by d0k:
[StaticAnalyzer] Use llvm::StringLiteral instead of StringRef in few places

StringRef's constexpr constructor seems to be extremely slow in MSVC
2017, so don't use it for generated tables. Should make PR43369 a bit
better, no functionality change.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h (diff)clang.src/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
Revision 372384 by bjope:
[AMDGPU] Use std::make_tuple to make some toolchains happy again

My toolchain stopped working (LLVM 8.0 , libstdc++ 5.4.0) after
r372338.

The same problem was seen in clang-cuda-build buildbots:

clang-cuda-build/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp:763:12:
error: chosen constructor is explicit in copy-initialization
    return {Reg, 0, nullptr};
           ^~~~~~~~~~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/tuple:479:19:
note: explicit constructor declared here
        constexpr tuple(_UElements&&... __elements)
                  ^

This commit adds explicit calls to std::make_tuple to work around
the problem.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp (diff)llvm.src/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
Revision 372383 by nico:
Revert r372366 "Use getTargetConstant for BLENDI, and add a test to catch it."

This reverts commit 52621307bcab2013e8833f3317cebd63a6db3885.

Tests have been failing all night with

    [0/2] ACTION //llvm/test:check-llvm(//llvm/utils/gn/build/toolchain:unix)
    -- Testing: 33647 tests, 64 threads --
    Testing: 0 .. 10..
    UNRESOLVED: LLVM :: CodeGen/AMDGPU/GlobalISel/isel-blendi-gettargetconstant.ll (6943 of 33647)
    ******************** TEST 'LLVM :: CodeGen/AMDGPU/GlobalISel/isel-blendi-gettargetconstant.ll' FAILED ********************
    Test has no run line!
    ********************

Since there were other concerns on https://reviews.llvm.org/D67785,
I'm just reverting for now.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (diff)llvm.src/lib/Target/X86/X86ISelLowering.cpp
The file was removed/llvm/trunk/test/CodeGen/AMDGPU/GlobalISel/isel-blendi-gettargetconstant.llllvm.src/test/CodeGen/AMDGPU/GlobalISel/isel-blendi-gettargetconstant.ll