Skip to content

Commit a8a26d4

Browse files
Merge amd-gfx13 and amd-gfx into amd-gfx-gfx13
3 parents 56aca88 + 66b98bd + 7872259 commit a8a26d4

File tree

933 files changed

+23998
-9769
lines changed

Some content is hidden

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

933 files changed

+23998
-9769
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
/clang/www/cxx_dr_status.html @Endilll
3232
/clang/www/make_cxx_dr_status @Endilll
3333

34-
/clang/include/clang/CIR @lanza @bcardosolopes
35-
/clang/lib/CIR @lanza @bcardosolopes
36-
/clang/tools/cir-* @lanza @bcardosolopes
34+
/clang/include/clang/CIR @lanza @bcardosolopes @xlauko @andykaylor
35+
/clang/lib/CIR @lanza @bcardosolopes @xlauko @andykaylor
36+
/clang/tools/cir-* @lanza @bcardosolopes @xlauko @andykaylor
3737

3838
/lldb/ @JDevlieghere
3939

.github/workflows/libclang-python-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ on:
1010
- 'main'
1111
paths:
1212
- 'clang/bindings/python/**'
13+
- 'clang/test/bindings/python/**'
1314
- 'clang/tools/libclang/**'
14-
- 'clang/CMakeList.txt'
1515
- '.github/workflows/libclang-python-tests.yml'
1616
- '.github/workflows/llvm-project-tests.yml'
1717
pull_request:
1818
paths:
1919
- 'clang/bindings/python/**'
20+
- 'clang/test/bindings/python/**'
2021
- 'clang/tools/libclang/**'
21-
- 'clang/CMakeList.txt'
2222
- '.github/workflows/libclang-python-tests.yml'
2323
- '.github/workflows/llvm-project-tests.yml'
2424

.github/workflows/premerge.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
if: >-
7777
github.repository_owner == 'llvm' &&
7878
(github.event_name != 'pull_request' || github.event.action != 'closed')
79-
runs-on: llvm-premerge-windows-runners
79+
runs-on: llvm-premerge-windows-2022-runners
8080
defaults:
8181
run:
8282
shell: bash

bolt/lib/Core/BinaryFunctionCallGraph.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,8 @@ buildCallGraph(BinaryContext &BC, CgFilterFunction Filter, bool CgFromPerfData,
200200
if (CSI.Symbol)
201201
Counts.emplace_back(CSI.Symbol, CSI.Count);
202202
} else {
203-
const uint64_t Count = BB->getExecutionCount();
203+
const uint64_t Count = BC.MIB->getAnnotationWithDefault(
204+
Inst, "Count", BB->getExecutionCount());
204205
Counts.emplace_back(DstSym, Count);
205206
}
206207

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ void InterfacesGlobalInitCheck::registerMatchers(MatchFinder *Finder) {
1919
hasDeclContext(anyOf(translationUnitDecl(), // Global scope.
2020
namespaceDecl(), // Namespace scope.
2121
recordDecl())), // Class scope.
22-
unless(isConstexpr()));
22+
unless(isConstexpr()), unless(isConstinit()));
2323

2424
const auto ReferencesUndefinedGlobalVar = declRefExpr(hasDeclaration(
2525
varDecl(GlobalVarDecl, unless(isDefinition())).bind("referencee")));

clang-tools-extra/clangd/ModulesBuilder.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,9 @@ bool IsModuleFileUpToDate(PathRef ModuleFilePath,
219219

220220
IntrusiveRefCntPtr<ModuleCache> ModCache = createCrossProcessModuleCache();
221221
PCHContainerOperations PCHOperations;
222+
CodeGenOptions CodeGenOpts;
222223
ASTReader Reader(PP, *ModCache, /*ASTContext=*/nullptr,
223-
PCHOperations.getRawReader(), {});
224+
PCHOperations.getRawReader(), CodeGenOpts, {});
224225

225226
// We don't need any listener here. By default it will use a validator
226227
// listener.

clang-tools-extra/docs/ReleaseNotes.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ Improvements to clang-doc
8888
Improvements to clang-query
8989
---------------------------
9090

91+
- Matcher queries interpreted by clang-query are now support trailing comma (,)
92+
in matcher arguments. Note that C++ still doesn't allow this in function
93+
arguments. So when porting a query to C++, remove all instances of trailing
94+
comma (otherwise C++ compiler will just complain about "expected expression").
95+
9196
Improvements to include-cleaner
9297
-------------------------------
9398
- Deprecated the ``-insert`` and ``-remove`` command line options, and added
@@ -232,6 +237,10 @@ Changes in existing checks
232237
<clang-tidy/checks/cppcoreguidelines/avoid-goto>` check by adding the option
233238
`IgnoreMacros` to ignore ``goto`` labels defined in macros.
234239

240+
- Improved :doc:`cppcoreguidelines-interfaces-global-init
241+
<clang-tidy/checks/cppcoreguidelines/interfaces-global-init>` check by
242+
fixing false positives on uses of ``constinit`` variables.
243+
235244
- Improved :doc:`cppcoreguidelines-missing-std-forward
236245
<clang-tidy/checks/cppcoreguidelines/missing-std-forward>` check by adding a
237246
flag to specify the function used for forwarding instead of ``std::forward``.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
void foo(void) {}
2+
// CHECK-OK: trailing-comma.c:1:1: note: "root" binds here
3+
// CHECK-ERR-COMMA: Invalid token <,> found when looking for a value.
4+
5+
// RUN: clang-query -c "match \
6+
// RUN: functionDecl( \
7+
// RUN: hasName( \
8+
// RUN: \"foo\", \
9+
// RUN: ), \
10+
// RUN: ) \
11+
// RUN: " %s | FileCheck --check-prefix=CHECK-OK %s
12+
13+
// Same with \n tokens
14+
// RUN: echo "match functionDecl( hasName( \"foo\" , ) , )" | sed "s/ /\n/g" >%t
15+
// RUN: clang-query -f %t %s | FileCheck --check-prefix=CHECK-OK %s
16+
17+
// RUN: not clang-query -c "match functionDecl(hasName(\"foo\"),,)" %s \
18+
// RUN: | FileCheck --check-prefix=CHECK-ERR-COMMA %s
19+
20+
// RUN: not clang-query -c "match functionDecl(,)" %s \
21+
// RUN: | FileCheck --check-prefix=CHECK-ERR-COMMA %s

clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/interfaces-global-init.cpp

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,23 @@ static int GlobalScopeBadInit3 = takesIntPtr(&ExternGlobal);
1414
static int GlobalScopeBadInit4 = 3 * (ExternGlobal + 2);
1515
// CHECK-MESSAGES: [[@LINE-1]]:12: warning: initializing non-local variable with non-const expression depending on uninitialized non-local variable 'ExternGlobal'
1616

17+
#if __cplusplus >= 202002L
18+
extern constinit int ExternConstinitGlobal;
19+
static int GlobalScopeConstinit1 = ExternConstinitGlobal;
20+
static int GlobalScopeConstinit2 = takesInt(ExternConstinitGlobal);
21+
static int GlobalScopeConstinit3 = takesIntPtr(&ExternConstinitGlobal);
22+
static int GlobalScopeConstinit4 = 3 * (ExternConstinitGlobal + 2);
23+
#endif
24+
1725
namespace ns {
1826
static int NamespaceScope = makesInt();
1927
static int NamespaceScopeBadInit = takesInt(ExternGlobal);
2028
// CHECK-MESSAGES: [[@LINE-1]]:12: warning: initializing non-local variable with non-const expression depending on uninitialized non-local variable 'ExternGlobal'
2129

30+
#if __cplusplus >= 202002L
31+
static int NamespaceScopeConstinit = takesInt(ExternConstinitGlobal);
32+
#endif
33+
2234
struct A {
2335
static int ClassScope;
2436
static int ClassScopeBadInit;
@@ -29,6 +41,17 @@ int A::ClassScopeBadInit = takesInt(ExternGlobal);
2941

3042
static int FromClassBadInit = takesInt(A::ClassScope);
3143
// CHECK-MESSAGES: [[@LINE-1]]:12: warning: initializing non-local variable with non-const expression depending on uninitialized non-local variable 'ClassScope'
44+
45+
#if __cplusplus >= 202002L
46+
struct B {
47+
static constinit int ClassScopeConstinit;
48+
static int ClassScopeFromConstinit;
49+
};
50+
51+
int B::ClassScopeFromConstinit = takesInt(ExternConstinitGlobal);
52+
static int FromClassScopeConstinit = takesInt(B::ClassScopeConstinit);
53+
#endif
54+
3255
} // namespace ns
3356

3457
// "const int B::I;" is fine, it just ODR-defines B::I. See [9.4.3] Static
@@ -42,6 +65,16 @@ const int B1::J;
4265
// CHECK-MESSAGES: [[@LINE-1]]:15: warning: initializing non-local variable with non-const expression depending on uninitialized non-local variable 'I'
4366
const int B1::I;
4467

68+
#if __cplusplus >= 202002L
69+
class D {
70+
static const constinit int I = 0;
71+
static const int J = I;
72+
};
73+
74+
const int D::J;
75+
const int D::I;
76+
#endif
77+
4578
void f() {
4679
// This is fine, it's executed after dynamic initialization occurs.
4780
static int G = takesInt(ExternGlobal);
@@ -81,4 +114,3 @@ class B2 {
81114
};
82115
const int B2::I;
83116
const int B2::J;
84-

clang/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,6 @@ if( CLANG_INCLUDE_TESTS )
536536
clang_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/test/Unit/lit.site.cfg
537537
)
538538
add_subdirectory(test)
539-
add_subdirectory(bindings/python/tests)
540539

541540
if(CLANG_BUILT_STANDALONE)
542541
umbrella_lit_testsuite_end(check-all)

0 commit comments

Comments
 (0)