Skip to content

Commit a68b9fe

Browse files
Merge from 'main' to 'sycl-web' (219 commits)
CONFLICT (content): Merge conflict in clang/lib/CodeGen/CGExpr.cpp
2 parents 45e0f12 + 164f85d commit a68b9fe

File tree

692 files changed

+30764
-4516
lines changed

Some content is hidden

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

692 files changed

+30764
-4516
lines changed

.ci/monolithic-linux.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ cmake -S ${MONOREPO_ROOT}/llvm -B ${BUILD_DIR} \
4545
-D LLVM_ENABLE_ASSERTIONS=ON \
4646
-D LLVM_BUILD_EXAMPLES=ON \
4747
-D COMPILER_RT_BUILD_LIBFUZZER=OFF \
48-
-D LLVM_LIT_ARGS="-v --xunit-xml-output ${BUILD_DIR}/test-results.xml" \
48+
-D LLVM_LIT_ARGS="-v --xunit-xml-output ${BUILD_DIR}/test-results.xml --timeout=1200 --time-tests" \
4949
-D LLVM_ENABLE_LLD=ON \
5050
-D CMAKE_CXX_FLAGS=-gmlt \
5151
-D BOLT_CLANG_EXE=/usr/bin/clang \

.ci/monolithic-windows.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ cmake -S ${MONOREPO_ROOT}/llvm -B ${BUILD_DIR} \
4545
-D LLVM_ENABLE_ASSERTIONS=ON \
4646
-D LLVM_BUILD_EXAMPLES=ON \
4747
-D COMPILER_RT_BUILD_LIBFUZZER=OFF \
48-
-D LLVM_LIT_ARGS="-v --xunit-xml-output ${BUILD_DIR}/test-results.xml" \
48+
-D LLVM_LIT_ARGS="-v --xunit-xml-output ${BUILD_DIR}/test-results.xml --timeout=1200 --time-tests" \
4949
-D COMPILER_RT_BUILD_ORC=OFF \
5050
-D CMAKE_C_COMPILER_LAUNCHER=sccache \
5151
-D CMAKE_CXX_COMPILER_LAUNCHER=sccache \

.github/workflows/libcxx-build-and-test.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ jobs:
161161
'generic-no-unicode',
162162
'generic-no-wide-characters',
163163
'generic-no-rtti',
164+
'generic-optimized-speed',
164165
'generic-static',
165166
'generic-with_llvm_unwinder',
166167
# TODO Find a better place for the benchmark and bootstrapping builds to live. They're either very expensive

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
;;; clang-include-fixer.el --- Emacs integration of the clang include fixer -*- lexical-binding: t; -*-
22

3+
;; Version: 0.1.0
34
;; Keywords: tools, c
45
;; Package-Requires: ((cl-lib "0.5") (json "1.2") (let-alist "1.0.4"))
56

clang-tools-extra/clang-query/QueryParser.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,8 @@ namespace query {
2828
// is found before End, return StringRef(). Begin is adjusted to exclude the
2929
// lexed region.
3030
StringRef QueryParser::lexWord() {
31-
Line = Line.drop_while([](char c) {
32-
// Don't trim newlines.
33-
return StringRef(" \t\v\f\r").contains(c);
34-
});
31+
// Don't trim newlines.
32+
Line = Line.ltrim(" \t\v\f\r");
3533

3634
if (Line.empty())
3735
// Even though the Line is empty, it contains a pointer and
@@ -152,8 +150,7 @@ QueryRef QueryParser::parseSetTraversalKind(TraversalKind QuerySession::*Var) {
152150

153151
QueryRef QueryParser::endQuery(QueryRef Q) {
154152
StringRef Extra = Line;
155-
StringRef ExtraTrimmed = Extra.drop_while(
156-
[](char c) { return StringRef(" \t\v\f\r").contains(c); });
153+
StringRef ExtraTrimmed = Extra.ltrim(" \t\v\f\r");
157154

158155
if ((!ExtraTrimmed.empty() && ExtraTrimmed[0] == '\n') ||
159156
(ExtraTrimmed.size() >= 2 && ExtraTrimmed[0] == '\r' &&

clang-tools-extra/clangd/AST.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ const TemplateTypeParmType *getFunctionPackType(const FunctionDecl *Callee) {
757757
// Returns the template parameter pack type that this parameter was expanded
758758
// from (if in the Args... or Args&... or Args&&... form), if this is the case,
759759
// nullptr otherwise.
760-
const TemplateTypeParmType *getUnderylingPackType(const ParmVarDecl *Param) {
760+
const TemplateTypeParmType *getUnderlyingPackType(const ParmVarDecl *Param) {
761761
const auto *PlainType = Param->getType().getTypePtr();
762762
if (auto *RT = dyn_cast<ReferenceType>(PlainType))
763763
PlainType = RT->getPointeeTypeAsWritten().getTypePtr();
@@ -793,8 +793,8 @@ class ForwardingCallVisitor
793793
: public RecursiveASTVisitor<ForwardingCallVisitor> {
794794
public:
795795
ForwardingCallVisitor(ArrayRef<const ParmVarDecl *> Parameters)
796-
: Parameters{Parameters}, PackType{getUnderylingPackType(
797-
Parameters.front())} {}
796+
: Parameters{Parameters},
797+
PackType{getUnderlyingPackType(Parameters.front())} {}
798798

799799
bool VisitCallExpr(CallExpr *E) {
800800
auto *Callee = getCalleeDeclOrUniqueOverload(E);
@@ -859,7 +859,7 @@ class ForwardingCallVisitor
859859
if (const auto *TTPT = getFunctionPackType(Callee)) {
860860
// In this case: Separate the parameters into head, pack and tail
861861
auto IsExpandedPack = [&](const ParmVarDecl *P) {
862-
return getUnderylingPackType(P) == TTPT;
862+
return getUnderlyingPackType(P) == TTPT;
863863
};
864864
ForwardingInfo FI;
865865
FI.Head = MatchingParams.take_until(IsExpandedPack);
@@ -964,7 +964,7 @@ resolveForwardingParameters(const FunctionDecl *D, unsigned MaxDepth) {
964964
if (const auto *TTPT = getFunctionPackType(D)) {
965965
// Split the parameters into head, pack and tail
966966
auto IsExpandedPack = [TTPT](const ParmVarDecl *P) {
967-
return getUnderylingPackType(P) == TTPT;
967+
return getUnderlyingPackType(P) == TTPT;
968968
};
969969
ArrayRef<const ParmVarDecl *> Head = Parameters.take_until(IsExpandedPack);
970970
ArrayRef<const ParmVarDecl *> Pack =
@@ -1016,7 +1016,7 @@ resolveForwardingParameters(const FunctionDecl *D, unsigned MaxDepth) {
10161016
}
10171017

10181018
bool isExpandedFromParameterPack(const ParmVarDecl *D) {
1019-
return getUnderylingPackType(D) != nullptr;
1019+
return getUnderlyingPackType(D) != nullptr;
10201020
}
10211021

10221022
} // namespace clangd

clang-tools-extra/docs/ReleaseNotes.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,8 @@ Changes in existing checks
368368
<clang-tidy/checks/misc/const-correctness>` check to avoid false positive when
369369
using pointer to member function. Additionally, the check no longer emits
370370
a diagnostic when a variable that is not type-dependent is an operand of a
371-
type-dependent binary operator.
371+
type-dependent binary operator. Improved performance of the check through
372+
optimizations.
372373

373374
- Improved :doc:`misc-include-cleaner
374375
<clang-tidy/checks/misc/include-cleaner>` check by adding option

clang/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,12 @@ set(C_INCLUDE_DIRS "" CACHE STRING
193193
set(GCC_INSTALL_PREFIX "" CACHE PATH "Directory where gcc is installed." )
194194
set(DEFAULT_SYSROOT "" CACHE STRING
195195
"Default <path> to all compiler invocations for --sysroot=<path>." )
196+
if(GCC_INSTALL_PREFIX)
197+
message(WARNING "GCC_INSTALL_PREFIX is deprecated and will be removed. Use "
198+
"configuration files (https://clang.llvm.org/docs/UsersManual.html#configuration-files)"
199+
"to specify the default --gcc-install-dir= or --gcc-triple=. --gcc-toolchain= is discouraged. "
200+
"See https://github.com/llvm/llvm-project/pull/77537 for detail.")
201+
endif()
196202

197203
set(ENABLE_LINKER_BUILD_ID OFF CACHE BOOL "pass --build-id to ld")
198204

clang/docs/ClangFormat.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ An easy way to create the ``.clang-format`` file is:
131131
132132
Available style options are described in :doc:`ClangFormatStyleOptions`.
133133

134+
.clang-format-ignore
135+
====================
136+
134137
You can create ``.clang-format-ignore`` files to make ``clang-format`` ignore
135138
certain files. A ``.clang-format-ignore`` file consists of patterns of file path
136139
names. It has the following format:
@@ -141,7 +144,8 @@ names. It has the following format:
141144
* A non-comment line is a single pattern.
142145
* The slash (``/``) is used as the directory separator.
143146
* A pattern is relative to the directory of the ``.clang-format-ignore`` file
144-
(or the root directory if the pattern starts with a slash).
147+
(or the root directory if the pattern starts with a slash). Patterns
148+
containing drive names (e.g. ``C:``) are not supported.
145149
* Patterns follow the rules specified in `POSIX 2.13.1, 2.13.2, and Rule 1 of
146150
2.13.3 <https://pubs.opengroup.org/onlinepubs/9699919799/utilities/
147151
V3_chap02.html#tag_18_13>`_.

clang/docs/ClangFormatStyleOptions.rst

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,23 @@ the configuration (without a prefix: ``Auto``).
392392
a &= 2;
393393
bbb = 2;
394394

395+
* ``bool AlignFunctionPointers`` Only for ``AlignConsecutiveDeclarations``. Whether function pointers are
396+
aligned.
397+
398+
.. code-block:: c++
399+
400+
true:
401+
unsigned i;
402+
int &r;
403+
int *p;
404+
int (*f)();
405+
406+
false:
407+
unsigned i;
408+
int &r;
409+
int *p;
410+
int (*f)();
411+
395412
* ``bool PadOperators`` Only for ``AlignConsecutiveAssignments``. Whether short assignment
396413
operators are left-padded to the same length as long ones in order to
397414
put all assignment operators to the right of the left hand side.
@@ -517,6 +534,23 @@ the configuration (without a prefix: ``Auto``).
517534
a &= 2;
518535
bbb = 2;
519536

537+
* ``bool AlignFunctionPointers`` Only for ``AlignConsecutiveDeclarations``. Whether function pointers are
538+
aligned.
539+
540+
.. code-block:: c++
541+
542+
true:
543+
unsigned i;
544+
int &r;
545+
int *p;
546+
int (*f)();
547+
548+
false:
549+
unsigned i;
550+
int &r;
551+
int *p;
552+
int (*f)();
553+
520554
* ``bool PadOperators`` Only for ``AlignConsecutiveAssignments``. Whether short assignment
521555
operators are left-padded to the same length as long ones in order to
522556
put all assignment operators to the right of the left hand side.
@@ -642,6 +676,23 @@ the configuration (without a prefix: ``Auto``).
642676
a &= 2;
643677
bbb = 2;
644678

679+
* ``bool AlignFunctionPointers`` Only for ``AlignConsecutiveDeclarations``. Whether function pointers are
680+
aligned.
681+
682+
.. code-block:: c++
683+
684+
true:
685+
unsigned i;
686+
int &r;
687+
int *p;
688+
int (*f)();
689+
690+
false:
691+
unsigned i;
692+
int &r;
693+
int *p;
694+
int (*f)();
695+
645696
* ``bool PadOperators`` Only for ``AlignConsecutiveAssignments``. Whether short assignment
646697
operators are left-padded to the same length as long ones in order to
647698
put all assignment operators to the right of the left hand side.
@@ -768,6 +819,23 @@ the configuration (without a prefix: ``Auto``).
768819
a &= 2;
769820
bbb = 2;
770821

822+
* ``bool AlignFunctionPointers`` Only for ``AlignConsecutiveDeclarations``. Whether function pointers are
823+
aligned.
824+
825+
.. code-block:: c++
826+
827+
true:
828+
unsigned i;
829+
int &r;
830+
int *p;
831+
int (*f)();
832+
833+
false:
834+
unsigned i;
835+
int &r;
836+
int *p;
837+
int (*f)();
838+
771839
* ``bool PadOperators`` Only for ``AlignConsecutiveAssignments``. Whether short assignment
772840
operators are left-padded to the same length as long ones in order to
773841
put all assignment operators to the right of the left hand side.

0 commit comments

Comments
 (0)