Skip to content

Commit b9526f1

Browse files
authored
Merge pull request #200 from AMD-Lightning-Internal/upstream_merge_202501191855
merge main into amd-staging
2 parents d4d7d3b + e0e5a24 commit b9526f1

File tree

65 files changed

+5784
-472
lines changed

Some content is hidden

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

65 files changed

+5784
-472
lines changed

.github/workflows/containers/github-action-ci-windows/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ RUN choco install -y handle
108108
109109
RUN pip3 install pywin32 buildbot-worker==2.8.4
110110
111-
ARG RUNNER_VERSION=2.319.1
111+
ARG RUNNER_VERSION=2.321.0
112112
ENV RUNNER_VERSION=$RUNNER_VERSION
113113
114114
RUN powershell -Command \

clang-tools-extra/docs/clang-tidy/Contributing.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ a starting point for your test cases. A rough outline of the process looks like
331331
- Issue the necessary diagnostics and fix-its in the ``check`` method.
332332
- Add the necessary ``CHECK-MESSAGES`` and ``CHECK-FIXES`` annotations to your
333333
test case to validate the diagnostics and fix-its.
334-
- Build the target ``check-clang-tool`` to confirm the test passes.
334+
- Build the target ``check-clang-tools`` to confirm the test passes.
335335
- Repeat the process until all aspects of your check are covered by tests.
336336

337337
The quickest way to prototype your matcher is to use :program:`clang-query` to
@@ -519,8 +519,8 @@ the check implements and what the current values are (e.g. for the
519519
public:
520520
MyCheck(StringRef Name, ClangTidyContext *Context)
521521
: ClangTidyCheck(Name, Context),
522-
SomeOption(Options.get("SomeOption1", -1U)),
523-
SomeOption(Options.get("SomeOption2", "some default")) {}
522+
SomeOption1(Options.get("SomeOption1", -1U)),
523+
SomeOption2(Options.get("SomeOption2", "some default")) {}
524524
525525
void storeOptions(ClangTidyOptions::OptionMap &Opts) override {
526526
Options.store(Opts, "SomeOption1", SomeOption1);

clang/docs/ClangTransformerTutorial.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ can express this a Transformer rewrite rule:
7070

7171
.. code-block:: c++
7272

73-
makeRule(functionDecl(hasName("MkX").bind("fun"),
73+
makeRule(functionDecl(hasName("MkX")).bind("fun"),
7474
noopEdit(node("fun")),
7575
cat("The name ``MkX`` is not allowed for functions; please rename"));
7676

clang/lib/AST/ByteCode/Compiler.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4984,6 +4984,15 @@ bool Compiler<Emitter>::visitDeclStmt(const DeclStmt *DS) {
49844984
return false;
49854985
if (!this->visitVarDecl(VD))
49864986
return false;
4987+
4988+
// Register decomposition decl holding vars.
4989+
if (const auto *DD = dyn_cast<DecompositionDecl>(VD)) {
4990+
for (auto *BD : DD->bindings())
4991+
if (auto *KD = BD->getHoldingVar()) {
4992+
if (!this->visitVarDecl(KD))
4993+
return false;
4994+
}
4995+
}
49874996
}
49884997

49894998
return true;

clang/lib/AST/Decl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2399,7 +2399,7 @@ Expr *VarDecl::getInit() {
23992399
if (!hasInit())
24002400
return nullptr;
24012401

2402-
if (auto *S = Init.dyn_cast<Stmt *>())
2402+
if (auto *S = dyn_cast<Stmt *>(Init))
24032403
return cast<Expr>(S);
24042404

24052405
auto *Eval = getEvaluatedStmt();

clang/test/AST/ByteCode/cxx17.cpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,23 @@ constexpr S s = getS(); // both-error {{must be initialized by a constant expres
105105
// both-note {{declared here}}
106106
static_assert(s.a == 12, ""); // both-error {{not an integral constant expression}} \
107107
// both-note {{initializer of 's' is not a constant expression}}
108+
109+
using size_t = decltype(sizeof(0));
110+
namespace std { template<typename T> struct tuple_size; }
111+
namespace std { template<size_t, typename> struct tuple_element; }
112+
113+
namespace constant {
114+
struct Q {};
115+
template<int N> constexpr int get(Q &&) { return N * N; }
116+
}
117+
template<> struct std::tuple_size<constant::Q> { static const int value = 3; };
118+
template<int N> struct std::tuple_element<N, constant::Q> { typedef int type; };
119+
120+
namespace constant {
121+
Q q;
122+
constexpr bool f() {
123+
auto [a, b, c] = q;
124+
return a == 0 && b == 1 && c == 4;
125+
}
126+
static_assert(f());
127+
}

flang/unittests/Optimizer/CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ set(LIBS
99
FIRDialectSupport
1010
FIRSupport
1111
HLFIRDialect
12-
${dialect_libs}
13-
${extension_libs}
1412
LLVMTargetParser
1513
)
1614

@@ -47,3 +45,8 @@ DEPENDS
4745
target_link_libraries(FlangOptimizerTests
4846
PRIVATE
4947
${LIBS})
48+
mlir_target_link_libraries(FlangOptimizerTests
49+
PRIVATE
50+
${dialect_libs}
51+
${extension_libs}
52+
)

libcxx/docs/Status/Cxx20Papers.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
"`P1236R1 <https://wg21.link/P1236R1>`__","Alternative Wording for P0907R4 Signed Integers are Two's Complement","2018-11 (San Diego)","","",""
8080
"`P1248R1 <https://wg21.link/P1248R1>`__","Remove CommonReference requirement from StrictWeakOrdering (a.k.a Fixing Relations)","2018-11 (San Diego)","|Complete|","13",""
8181
"`P1285R0 <https://wg21.link/P1285R0>`__","Improving Completeness Requirements for Type Traits","2018-11 (San Diego)","","",""
82-
"`P1353R0 <https://wg21.link/P1353R0>`__","Missing feature test macros","2018-11 (San Diego)","|In Progress|","",""
82+
"`P1353R0 <https://wg21.link/P1353R0>`__","Missing feature test macros","2018-11 (San Diego)","|Complete|","19",""
8383
"","","","","",""
8484
"`P0339R6 <https://wg21.link/P0339R6>`__","polymorphic_allocator<> as a vocabulary type","2019-02 (Kona)","|Complete|","16",""
8585
"`P0340R3 <https://wg21.link/P0340R3>`__","Making std::underlying_type SFINAE-friendly","2019-02 (Kona)","|Complete|","9",""

llvm/docs/DeveloperPolicy.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ awareness of. For such changes, the following should be done:
136136

137137
.. warning::
138138

139-
Phabricator is deprecated is available in read-only mode,
139+
Phabricator is deprecated and is available in read-only mode,
140140
for new code contributions use :ref:`GitHub Pull Requests <github-reviews>`.
141141
This section contains old information that needs to be updated.
142142

llvm/docs/GitHub.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ documentation refer to `GitHub's documentation <https://docs.github.com/pull-req
5050
.. note::
5151
If you are using a Pull Request for purposes other than review
5252
(eg: precommit CI results, convenient web-based reverts, etc)
53-
`skip-precommit-approval <https://github.com/llvm/llvm-project/labels?q=skip-precommit-approval>`_
53+
add the `skip-precommit-approval <https://github.com/llvm/llvm-project/labels?q=skip-precommit-approval>`_
5454
label to the PR.
5555

5656
GitHub Tools

0 commit comments

Comments
 (0)