Skip to content

Commit 05984ff

Browse files
committed
apply suggestions
1 parent fa6335d commit 05984ff

File tree

3 files changed

+13
-17
lines changed

3 files changed

+13
-17
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,6 @@ Bug Fixes to Attribute Support
148148

149149
- ``[[nodiscard]]`` is now respected on Objective-C and Objective-C++ methods.
150150
(#GH141504)
151-
- Fixed a crash in the static analyzer that when the expression in an
152-
``[[assume(expr)]]`` attribute was enclosed in parentheses. (#GH151529)
153151

154152
Bug Fixes to C++ Support
155153
^^^^^^^^^^^^^^^^^^^^^^^^
@@ -249,6 +247,8 @@ New features
249247

250248
Crash and bug fixes
251249
^^^^^^^^^^^^^^^^^^^
250+
- Fixed a crash in the static analyzer that when the expression in an
251+
``[[assume(expr)]]`` attribute was enclosed in parentheses. (#GH151529)
252252

253253
Improvements
254254
^^^^^^^^^^^^

clang/test/Analysis/builtin_assume.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,14 @@ int using_builtin_assume_has_no_sideeffects(int y) {
6262

6363
return y;
6464
}
65+
66+
template <int ...args>
67+
bool issue151529() {
68+
[[assume((true))]]; // no-crash
69+
[[assume(((args >= 0) && ...))]]; // no-crash
70+
return ((args >= 0) && ...);
71+
}
72+
73+
void instantiate_issue151529() {
74+
issue151529<0>();
75+
}

clang/test/Analysis/issue-151529.cpp

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)