Skip to content

Commit b34a653

Browse files
Merge branch 'main' into no_loop_flang
2 parents 91e5e58 + fee17b3 commit b34a653

File tree

972 files changed

+57801
-16148
lines changed

Some content is hidden

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

972 files changed

+57801
-16148
lines changed

bolt/runtime/instr.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -714,9 +714,11 @@ static char *getBinaryPath() {
714714
uint32_t Ret = __readlink(FindBuf, TargetPath, sizeof(TargetPath));
715715
assert(Ret != -1 && Ret != BufSize, "readlink error");
716716
TargetPath[Ret] = '\0';
717+
__close(FDdir);
717718
return TargetPath;
718719
}
719720
}
721+
__close(FDdir);
720722
return nullptr;
721723
}
722724

bolt/test/runtime/copy_file.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import sys
2+
import shutil
3+
4+
with open(sys.argv[1] + ".output") as log_file:
5+
lines = log_file.readlines()
6+
for line in lines:
7+
if line.startswith(sys.argv[2]):
8+
pid = line.split(" ")[1].strip()
9+
shutil.copy(
10+
sys.argv[1] + "." + pid + ".fdata",
11+
sys.argv[1] + "." + sys.argv[3] + ".fdata",
12+
)
13+
sys.exit(0)
14+
15+
sys.exit(1)

bolt/test/runtime/instrumentation-indirect-2.c

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ int main() {
5050
return 0;
5151
}
5252
/*
53-
REQUIRES: system-linux,shell,fuser
53+
REQUIRES: system-linux,fuser
5454
5555
RUN: %clang %cflags %s -o %t.exe -Wl,-q -pie -fpie
5656
@@ -61,10 +61,14 @@ RUN: --instrumentation-wait-forks
6161
6262
# Instrumented program needs to finish returning zero
6363
# Both output and profile must contain all 16 functions
64-
RUN: %t.instrumented_conservative > %t.output
65-
# Wait for profile and output to be fully written
66-
RUN: bash %S/wait_file.sh %t.output
67-
RUN: bash %S/wait_file.sh %t.fdata
64+
# We need to use bash to invoke this as otherwise we hang inside a
65+
# popen.communicate call in lit's internal shell. Eventually we should not
66+
# need this.
67+
# TODO(boomanaiden154): Remove once
68+
# https://github.com/llvm/llvm-project/issues/156484 is fixed.
69+
RUN: bash -c "%t.instrumented_conservative; wait" > %t.output
70+
# We can just read because we ensure the profile will be fully written by
71+
# calling wait inside the bash invocation.
6872
RUN: cat %t.output | FileCheck %s --check-prefix=CHECK-OUTPUT
6973
RUN: cat %t.fdata | FileCheck %s --check-prefix=CHECK-COMMON-PROF
7074
@@ -112,14 +116,8 @@ RUN: bash %S/wait_file.sh %t.output
112116
# Make sure all functions were called
113117
RUN: cat %t.output | FileCheck %s --check-prefix=CHECK-OUTPUT
114118
115-
RUN: child_pid=$(cat %t.output | grep funcA | awk '{print $2;}')
116-
RUN: par_pid=$(cat %t.output | grep funcB | awk '{print $2;}')
117-
118-
RUN: bash %S/wait_file.sh %t.$child_pid.fdata
119-
RUN: bash %S/wait_file.sh %t.$par_pid.fdata
120-
121-
RUN: mv %t.$child_pid.fdata %t.child.fdata
122-
RUN: mv %t.$par_pid.fdata %t.parent.fdata
119+
RUN: %python %S/copy_file.py %t funcA child
120+
RUN: %python %S/copy_file.py %t funcB parent
123121
124122
# Instrumented binary must produce two profiles with only local calls
125123
# recorded. Functions called only in child should not appear in parent's

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ struct IntegerLiteralCheck {
2929
// integer (wb), and can be a complex number ('i', 'j'). In MS compatibility
3030
// mode, suffixes like i32 are supported.
3131
static constexpr llvm::StringLiteral Suffixes =
32-
llvm::StringLiteral("uUlLzZwWbBiIjJ");
32+
llvm::StringLiteral("uUlLzZwWiIjJ");
3333
};
3434

3535
struct FloatingLiteralCheck {

clang-tools-extra/clangd/XRefs.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,11 +1106,11 @@ class FindControlFlow : public RecursiveASTVisitor<FindControlFlow> {
11061106
return true;
11071107
}
11081108
bool VisitBreakStmt(BreakStmt *B) {
1109-
found(Break, B->getBreakLoc());
1109+
found(Break, B->getKwLoc());
11101110
return true;
11111111
}
11121112
bool VisitContinueStmt(ContinueStmt *C) {
1113-
found(Continue, C->getContinueLoc());
1113+
found(Continue, C->getKwLoc());
11141114
return true;
11151115
}
11161116
bool VisitSwitchCase(SwitchCase *C) {

clang-tools-extra/test/clang-tidy/checkers/cert/uppercase-literal-suffix-integer.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,12 @@ void integer_suffix() {
128128
static_assert(is_same<decltype(v24), const unsigned long long>::value, "");
129129
static_assert(v24 == 1, "");
130130
}
131+
132+
void no_warning_on_hex_literals() {
133+
int a = 0xa;
134+
int b = 0xb;
135+
int c = 0xc;
136+
int d = 0xd;
137+
int e = 0xe;
138+
int f = 0xf;
139+
}

clang/docs/OpenMPSupport.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,8 @@ implementation.
443443
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
444444
| Traits for default device envirable | :none:`unclaimed` | :none:`unclaimed` | |
445445
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
446-
| Optionally omit array length expression | :good:`done` | :none:`unclaimed` | https://github.com/llvm/llvm-project/pull/148048 |
446+
| Optionally omit array length expression | :good:`done` | :none:`unclaimed` | (Parse) https://github.com/llvm/llvm-project/pull/148048, |
447+
| | | | (Sema) https://github.com/llvm/llvm-project/pull/152786 |
447448
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
448449
| Canonical loop sequences | :none:`unclaimed` | :part:`In Progress` | |
449450
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+

clang/docs/ReleaseNotes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ C Language Changes
134134

135135
C2y Feature Support
136136
^^^^^^^^^^^^^^^^^^^
137+
- Clang now supports `N3355 <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3355.htm>`_ Named Loops.
137138

138139
C23 Feature Support
139140
^^^^^^^^^^^^^^^^^^^
@@ -481,6 +482,7 @@ OpenMP Support
481482
modifier in the ``adjust_args`` clause.
482483
- Allow array length to be omitted in array section subscript expression.
483484
- Fixed non-contiguous strided update in the ``omp target update`` directive with the ``from`` clause.
485+
- Properly handle array section/assumed-size array privatization in C/C++.
484486

485487
Improvements
486488
^^^^^^^^^^^^

clang/docs/analyzer/checkers.rst

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2932,18 +2932,6 @@ the locking/unlocking of ``mtx_t`` mutexes.
29322932
mtx_lock(&mtx1); // warn: This lock has already been acquired
29332933
}
29342934
2935-
.. _alpha-core-CastSize:
2936-
2937-
alpha.core.CastSize (C)
2938-
"""""""""""""""""""""""
2939-
Check when casting a malloc'ed type ``T``, whether the size is a multiple of the size of ``T``.
2940-
2941-
.. code-block:: c
2942-
2943-
void test() {
2944-
int *x = (int *) malloc(11); // warn
2945-
}
2946-
29472935
.. _alpha-core-CastToStruct:
29482936
29492937
alpha.core.CastToStruct (C, C++)

clang/include/clang/AST/JSONNodeDumper.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,7 @@ class JSONNodeDumper
333333
void VisitStringLiteral(const StringLiteral *SL);
334334
void VisitCXXBoolLiteralExpr(const CXXBoolLiteralExpr *BLE);
335335

336+
void VisitLoopControlStmt(const LoopControlStmt *LS);
336337
void VisitIfStmt(const IfStmt *IS);
337338
void VisitSwitchStmt(const SwitchStmt *SS);
338339
void VisitCaseStmt(const CaseStmt *CS);

0 commit comments

Comments
 (0)