Skip to content

Commit 176d9bf

Browse files
committed
Merge remote-tracking branch 'intel/sycl' into remove-sycldevice
2 parents 3398497 + 56c9ec4 commit 176d9bf

File tree

4,723 files changed

+267159
-107057
lines changed

Some content is hidden

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

4,723 files changed

+267159
-107057
lines changed

.github/CODEOWNERS

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ sycl/include/CL/sycl/swizzles.def @turinevgeny
7575
sycl/include/CL/sycl/types.hpp @turinevgeny
7676

7777
# XPTI instrumentation utilities
78-
xpti/ @tovinkere @andykaylor
79-
xptifw/ @tovinkere @andykaylor
78+
xpti/ @tovinkere @andykaylor @alexbatashev
79+
xptifw/ @tovinkere @andykaylor @alexbatashev
8080

8181
# DPC++ tools
8282
llvm/**/append-file/ @mdtoguchi @AGindinson
@@ -99,10 +99,10 @@ clang/tools/clang-offload-deps/ @sndmitriev @mlychkov @AlexeySachkov
9999
clang/tools/clang-offload-extract/ @sndmitriev @mlychkov @AlexeySachkov
100100

101101
# Explicit SIMD
102-
SYCLLowerIR/ @kbobrovs @DenisBakhvalov
103-
esimd/ @kbobrovs @DenisBakhvalov
104-
sycl/include/sycl/ext/intel/experimental/esimd.hpp @kbobrovs @DenisBakhvalov
105-
sycl/doc/extensions/ExplicitSIMD/ @kbobrovs
102+
SYCLLowerIR/ @kbobrovs @DenisBakhvalov @kychendev
103+
esimd/ @kbobrovs @DenisBakhvalov @kychendev
104+
sycl/include/sycl/ext/intel/experimental/esimd.hpp @kbobrovs @DenisBakhvalov @kychendev
105+
sycl/doc/extensions/ExplicitSIMD/ @kbobrovs @DenisBakhvalov @kychendev
106106

107107
# ITT annotations
108108
llvm/lib/Transforms/Instrumentation/SPIRITTAnnotations.cpp @MrSidims @vzakhari

.github/workflows/gh_pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Install deps
1717
run: |
1818
sudo apt-get install -y doxygen graphviz ssh ninja-build
19-
sudo pip3 install 'sphinx==3.0.0' 'recommonmark==0.6.0' 'sphinx_markdown_tables==0.0.12'
19+
sudo pip3 install 'sphinx==4.1.2' 'myst-parser==0.15.1'
2020
- name: Build Docs
2121
run: |
2222
mkdir -p $GITHUB_WORKSPACE/build

.mailmap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
2929
3030
31-
Jon Roelofs <[email protected]> Jon Roelofs <jroelofs@jroelofs.com>
32-
Jon Roelofs <[email protected]> Jonathan Roelofs <jonathan@codesourcery.com>
33-
Jon Roelofs <[email protected]> Jonathan Roelofs <jroelofs@jroelofs.com>
31+
Jon Roelofs <[email protected]> <jonathan@codesourcery.com>
32+
Jon Roelofs <[email protected]> <jroelofs@jroelofs.com>
33+
LLVM GN Syncbot <llvmgnsyncbot@gmail.com>
3434
Martin Storsjö <[email protected]>
35-
Saleem Abdulrasool <[email protected]> <[email protected]>
35+
Saleem Abdulrasool <[email protected]>

CONTRIBUTING.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,6 @@ There are 3 types of tests which are used for DPC++ toolchain validation:
6666
should not have hardware (e.g. GPU, FPGA, etc.) or external software
6767
dependencies (e.g. OpenCL, Level Zero, CUDA runtimes). All tests not following
6868
this approach should be moved to DPC++ end-to-end or SYCL-CTS tests.
69-
However, the tests for a feature under active development requiring atomic
70-
change for tests and product can be put to
71-
[sycl/test/on-device](../../sycl/test/on-device) temporarily. It is developer
72-
responsibility to move the tests to DPC++ E2E test suite or SYCL-CTS once
73-
the feature is stabilized.
7469

7570
**Guidelines for adding DPC++ in-tree LIT tests (DPC++ Clang FE tests)**:
7671
- Use `sycl::` namespace instead of `cl::sycl::`

README.md

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,30 @@
11
# Intel Project for LLVM\* technology
22

3-
## Introduction
3+
Intel staging area for llvm.org contribution. Home for Intel LLVM-based projects:
44

5-
Intel staging area for llvm.org contribution.
6-
Home for Intel LLVM-based projects:
5+
## oneAPI Data Parallel C++ compiler
76

8-
* oneAPI Data Parallel C++ compiler - see
9-
[sycl](https://github.com/intel/llvm/tree/sycl) branch. More information on
10-
oneAPI and DPC++ is available at
11-
[https://www.oneapi.com/](https://www.oneapi.com/)
12-
* [![Linux Post Commit Checks](https://github.com/intel/llvm/workflows/Linux%20Post%20Commit%20Checks/badge.svg)](https://github.com/intel/llvm/actions?query=workflow%3A%22Linux+Post+Commit+Checks%22)
13-
[![Generate Doxygen documentation](https://github.com/intel/llvm/workflows/Generate%20Doxygen%20documentation/badge.svg)](https://github.com/intel/llvm/actions?query=workflow%3A%22Generate+Doxygen+documentation%22)
14-
* Late-outline OpenMP\* and OpenMP\* Offload - see
15-
[openmp](https://github.com/intel/llvm/tree/openmp) branch.
7+
[![](https://spec.oneapi.io/oneapi-logo-white-scaled.jpg)](https://www.oneapi.io/)
168

17-
## License
9+
See [sycl](https://github.com/intel/llvm/tree/sycl) branch and
10+
[DPC++ Documentation](https://intel.github.io/llvm-docs/).
1811

19-
See [LICENSE.txt](sycl/LICENSE.TXT) for details.
12+
[![Linux Post Commit Checks](https://github.com/intel/llvm/workflows/Linux%20Post%20Commit%20Checks/badge.svg)](https://github.com/intel/llvm/actions?query=workflow%3A%22Linux+Post+Commit+Checks%22)
13+
[![Generate Doxygen documentation](https://github.com/intel/llvm/workflows/Generate%20Doxygen%20documentation/badge.svg)](https://github.com/intel/llvm/actions?query=workflow%3A%22Generate+Doxygen+documentation%22)
2014

21-
## Contributing
15+
DPC++ is an open, cross-architecture language built upon the ISO C++ and Khronos
16+
SYCL\* standards. DPC++ extends these standards with a number of extensions,
17+
which can be found in [sycl/doc/extensions](sycl/doc/extensions) directory.
2218

23-
See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
19+
## Late-outline OpenMP\* and OpenMP\* Offload
20+
See [openmp](https://github.com/intel/llvm/tree/openmp) branch.
2421

25-
## Sub-projects Documentation
22+
# License
2623

27-
* oneAPI Data Parallel C++ compiler - See
28-
[DPC++ Documentation](https://intel.github.io/llvm-docs/)
29-
* Late-outline OpenMP\* and OpenMP\* Offload - TBD
24+
See [LICENSE.txt](sycl/LICENSE.TXT) for details.
3025

31-
## DPC++ extensions
26+
# Contributing
3227

33-
DPC++ is an open, cross-architecture language built upon the ISO C++ and Khronos
34-
SYCL\* standards. DPC++ extends these standards with a number of extensions,
35-
which can be found in [sycl/doc/extensions](sycl/doc/extensions) directory.
28+
See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
3629

3730
*\*Other names and brands may be claimed as the property of others.*

buildbot/configure.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ def do_configure(args):
2727
llvm_targets_to_build = 'X86'
2828
llvm_enable_projects = 'clang;' + llvm_external_projects
2929
libclc_targets_to_build = ''
30+
libclc_gen_remangled_variants = 'OFF'
3031
sycl_build_pi_cuda = 'OFF'
3132
sycl_build_pi_esimd_cpu = 'ON'
3233
sycl_build_pi_rocm = 'OFF'
@@ -53,15 +54,20 @@ def do_configure(args):
5354
if args.cuda:
5455
llvm_targets_to_build += ';NVPTX'
5556
libclc_targets_to_build = 'nvptx64--;nvptx64--nvidiacl'
57+
libclc_gen_remangled_variants = 'ON'
5658
sycl_build_pi_cuda = 'ON'
5759

5860
if args.rocm:
5961
if args.rocm_platform == 'AMD':
6062
llvm_targets_to_build += ';AMDGPU'
6163
libclc_targets_to_build += ';amdgcn--;amdgcn--amdhsa'
64+
65+
# The ROCm plugin for AMD uses lld for linking
66+
llvm_enable_projects += ';lld'
6267
elif args.rocm_platform == 'NVIDIA' and not args.cuda:
6368
llvm_targets_to_build += ';NVPTX'
6469
libclc_targets_to_build += ';nvptx64--;nvptx64--nvidiacl'
70+
libclc_gen_remangled_variants = 'ON'
6571

6672
sycl_build_pi_rocm_platform = args.rocm_platform
6773
sycl_build_pi_rocm = 'ON'
@@ -99,6 +105,7 @@ def do_configure(args):
99105
"-DLLVM_EXTERNAL_LIBDEVICE_SOURCE_DIR={}".format(libdevice_dir),
100106
"-DLLVM_ENABLE_PROJECTS={}".format(llvm_enable_projects),
101107
"-DLIBCLC_TARGETS_TO_BUILD={}".format(libclc_targets_to_build),
108+
"-DLIBCLC_GENERATE_REMANGLED_VARIANTS={}".format(libclc_gen_remangled_variants),
102109
"-DSYCL_BUILD_PI_CUDA={}".format(sycl_build_pi_cuda),
103110
"-DSYCL_BUILD_PI_ROCM={}".format(sycl_build_pi_rocm),
104111
"-DSYCL_BUILD_PI_ROCM_PLATFORM={}".format(sycl_build_pi_rocm_platform),

buildbot/dependency.conf

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@ ocl_cpu_rt_ver=2021.12.6.0.19
44
# https://github.com/intel/llvm/releases/download/2021-WW26/win-oclcpuexp-2021.12.6.0.19_rel.zip
55
ocl_cpu_rt_ver_win=2021.12.6.0.19
66
# Same GPU driver supports Level Zero and OpenCL
7-
# https://github.com/intel/compute-runtime/releases/tag/21.26.20194
8-
ocl_gpu_rt_ver=21.26.20194
7+
# https://github.com/intel/compute-runtime/releases/tag/21.33.20678
8+
ocl_gpu_rt_ver=21.33.20678
99
# Same GPU driver supports Level Zero and OpenCL
10-
# https://downloadmirror.intel.com/30579/a08/igfx_win_100.9684.zip
11-
# https://downloadmirror.intel.com/30381/a08/igfx_win10_100.9466.zip
12-
ocl_gpu_rt_ver_win=30.0.100.9684
10+
# https://downloadmirror.intel.com/646152/igfx_win_100.9805.zip
11+
ocl_gpu_rt_ver_win=30.0.100.9805
1312
intel_sycl_ver=build
1413

1514
# TBB binaries can be built from sources following instructions under
@@ -31,8 +30,8 @@ ocloc_ver_win=27.20.100.9168
3130
[DRIVER VERSIONS]
3231
cpu_driver_lin=2021.12.6.0.19
3332
cpu_driver_win=2021.12.6.0.19
34-
gpu_driver_lin=21.26.20194
35-
gpu_driver_win=30.0.100.9684
33+
gpu_driver_lin=21.33.20678
34+
gpu_driver_win=30.0.100.9805
3635
fpga_driver_lin=2021.12.6.0.19
3736
fpga_driver_win=2021.12.6.0.19
3837
# NVidia CUDA driver

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ void ChangeNamespaceTool::registerMatchers(ast_matchers::MatchFinder *Finder) {
442442
hasDeclaration(DeclMatcher),
443443
unless(templateSpecializationType()))))),
444444
hasParent(nestedNameSpecifierLoc()),
445-
hasAncestor(isImplicit()),
445+
hasAncestor(decl(isImplicit())),
446446
hasAncestor(UsingShadowDeclInClass),
447447
hasAncestor(functionDecl(isDefaulted())))),
448448
hasAncestor(decl().bind("dc")))
@@ -466,7 +466,7 @@ void ChangeNamespaceTool::registerMatchers(ast_matchers::MatchFinder *Finder) {
466466
hasAncestor(decl(IsInMovedNs).bind("dc")),
467467
loc(nestedNameSpecifier(
468468
specifiesType(hasDeclaration(DeclMatcher.bind("from_decl"))))),
469-
unless(anyOf(hasAncestor(isImplicit()),
469+
unless(anyOf(hasAncestor(decl(isImplicit())),
470470
hasAncestor(UsingShadowDeclInClass),
471471
hasAncestor(functionDecl(isDefaulted())),
472472
hasAncestor(typeLoc(loc(qualType(hasDeclaration(
@@ -495,7 +495,7 @@ void ChangeNamespaceTool::registerMatchers(ast_matchers::MatchFinder *Finder) {
495495
hasAncestor(cxxRecordDecl()))),
496496
hasParent(namespaceDecl()));
497497
Finder->addMatcher(expr(hasAncestor(decl().bind("dc")), IsInMovedNs,
498-
unless(hasAncestor(isImplicit())),
498+
unless(hasAncestor(decl(isImplicit()))),
499499
anyOf(callExpr(callee(FuncMatcher)).bind("call"),
500500
declRefExpr(to(FuncMatcher.bind("func_decl")))
501501
.bind("func_ref"))),

clang-tools-extra/clang-tidy/abseil/StringFindStrContainsCheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ makeRewriteRule(const std::vector<std::string> &StringLikeClassNames,
5353
to(varDecl(hasName("npos"), hasDeclContext(StringLikeClass))));
5454
auto StringFind = cxxMemberCallExpr(
5555
callee(cxxMethodDecl(
56-
hasName("find"),
56+
hasName("find"), parameterCountIs(2),
5757
hasParameter(
5858
0, parmVarDecl(anyOf(hasType(StringType), hasType(CharStarType),
5959
hasType(CharType)))))),

clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
//===--- BranchCloneCheck.cpp - clang-tidy --------------------------------===//
22
//
3-
// The LLVM Compiler Infrastructure
4-
//
5-
// This file is distributed under the University of Illinois Open Source
6-
// License. See LICENSE.TXT for details.
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
76
//
87
//===----------------------------------------------------------------------===//
98

clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
//===--- BranchCloneCheck.h - clang-tidy ------------------------*- C++ -*-===//
22
//
3-
// The LLVM Compiler Infrastructure
4-
//
5-
// This file is distributed under the University of Illinois Open Source
6-
// License. See LICENSE.TXT for details.
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
76
//
87
//===----------------------------------------------------------------------===//
98

clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ void ProBoundsConstantArrayIndexCheck::registerPPCallbacks(
3838
void ProBoundsConstantArrayIndexCheck::registerMatchers(MatchFinder *Finder) {
3939
// Note: if a struct contains an array member, the compiler-generated
4040
// constructor has an arraySubscriptExpr.
41-
Finder->addMatcher(
42-
arraySubscriptExpr(
43-
hasBase(ignoringImpCasts(hasType(constantArrayType().bind("type")))),
44-
hasIndex(expr().bind("index")), unless(hasAncestor(isImplicit())))
45-
.bind("expr"),
46-
this);
41+
Finder->addMatcher(arraySubscriptExpr(hasBase(ignoringImpCasts(hasType(
42+
constantArrayType().bind("type")))),
43+
hasIndex(expr().bind("index")),
44+
unless(hasAncestor(decl(isImplicit()))))
45+
.bind("expr"),
46+
this);
4747

4848
Finder->addMatcher(
4949
cxxOperatorCallExpr(

clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -433,17 +433,25 @@ void ProTypeMemberInitCheck::checkMissingMemberInitializer(
433433
[&](const FieldDecl *F) { OrderedFields.push_back(F); });
434434

435435
// Collect all the fields we need to initialize, including indirect fields.
436+
// It only includes fields that have not been fixed
436437
SmallPtrSet<const FieldDecl *, 16> AllFieldsToInit;
437-
forEachField(ClassDecl, FieldsToInit,
438-
[&](const FieldDecl *F) { AllFieldsToInit.insert(F); });
439-
if (AllFieldsToInit.empty())
438+
forEachField(ClassDecl, FieldsToInit, [&](const FieldDecl *F) {
439+
if (!HasRecordClassMemberSet.contains(F)) {
440+
AllFieldsToInit.insert(F);
441+
HasRecordClassMemberSet.insert(F);
442+
}
443+
});
444+
if (FieldsToInit.empty())
440445
return;
441446

442447
DiagnosticBuilder Diag =
443448
diag(Ctor ? Ctor->getBeginLoc() : ClassDecl.getLocation(),
444449
"%select{|union }0constructor %select{does not|should}0 initialize "
445450
"%select{|one of }0these fields: %1")
446-
<< IsUnion << toCommaSeparatedString(OrderedFields, AllFieldsToInit);
451+
<< IsUnion << toCommaSeparatedString(OrderedFields, FieldsToInit);
452+
453+
if (AllFieldsToInit.empty())
454+
return;
447455

448456
// Do not propose fixes for constructors in macros since we cannot place them
449457
// correctly.

clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_PRO_TYPE_MEMBER_INIT_H
1111

1212
#include "../ClangTidyCheck.h"
13+
#include "llvm/ADT/DenseSet.h"
1314

1415
namespace clang {
1516
namespace tidy {
@@ -72,6 +73,10 @@ class ProTypeMemberInitCheck : public ClangTidyCheck {
7273
// instead of brace initialization. Only effective in C++11 mode. Default is
7374
// false.
7475
bool UseAssignment;
76+
77+
// Record the member variables that have been initialized to prevent repeated
78+
// initialization.
79+
llvm::DenseSet<const FieldDecl *> HasRecordClassMemberSet;
7580
};
7681

7782
} // namespace cppcoreguidelines

clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
//===--- UseTrailingReturnTypeCheck.cpp - clang-tidy-----------------------===//
22
//
3-
// The LLVM Compiler Infrastructure
4-
//
5-
// This file is distributed under the University of Illinois Open Source
6-
// License. See LICENSE.TXT for details.
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
76
//
87
//===----------------------------------------------------------------------===//
98

clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
//===--- UseTrailingReturnTypeCheck.h - clang-tidy---------------*- C++ -*-===//
22
//
3-
// The LLVM Compiler Infrastructure
4-
//
5-
// This file is distributed under the University of Illinois Open Source
6-
// License. See LICENSE.TXT for details.
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
76
//
87
//===----------------------------------------------------------------------===//
98

clang-tools-extra/clang-tidy/objc/SuperSelfCheck.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
//===--- SuperSelfCheck.cpp - clang-tidy ----------------------------------===//
22
//
3-
// The LLVM Compiler Infrastructure
4-
//
5-
// This file is distributed under the University of Illinois Open Source
6-
// License. See LICENSE.TXT for details.
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
76
//
87
//===----------------------------------------------------------------------===//
98

clang-tools-extra/clang-tidy/objc/SuperSelfCheck.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
//===--- SuperSelfCheck.h - clang-tidy --------------------------*- C++ -*-===//
22
//
3-
// The LLVM Compiler Infrastructure
4-
//
5-
// This file is distributed under the University of Illinois Open Source
6-
// License. See LICENSE.TXT for details.
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
76
//
87
//===----------------------------------------------------------------------===//
98

clang-tools-extra/clang-tidy/readability/BracesAroundStatementsCheck.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,10 @@ BracesAroundStatementsCheck::findRParenLoc(const IfOrWhileStmt *S,
186186
bool BracesAroundStatementsCheck::checkStmt(
187187
const MatchFinder::MatchResult &Result, const Stmt *S,
188188
SourceLocation InitialLoc, SourceLocation EndLocHint) {
189+
190+
while (const auto *AS = dyn_cast<AttributedStmt>(S))
191+
S = AS->getSubStmt();
192+
189193
// 1) If there's a corresponding "else" or "while", the check inserts "} "
190194
// right before that token.
191195
// 2) If there's a multi-line block comment starting on the same line after

clang-tools-extra/clang-tidy/readability/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ add_clang_library(clangTidyReadabilityModule
1313
ElseAfterReturnCheck.cpp
1414
FunctionCognitiveComplexityCheck.cpp
1515
FunctionSizeCheck.cpp
16+
IdentifierLengthCheck.cpp
1617
IdentifierNamingCheck.cpp
1718
ImplicitBoolConversionCheck.cpp
1819
InconsistentDeclarationParameterNameCheck.cpp

clang-tools-extra/clang-tidy/readability/ConvertMemberFunctionsToStatic.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
//===--- ConvertMemberFunctionsToStatic.cpp - clang-tidy ------------------===//
22
//
3-
// The LLVM Compiler Infrastructure
4-
//
5-
// This file is distributed under the University of Illinois Open Source
6-
// License. See LICENSE.TXT for details.
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
76
//
87
//===----------------------------------------------------------------------===//
98

0 commit comments

Comments
 (0)