Skip to content

Commit 5036207

Browse files
committed
[FOLD] address review comments
1 parent 7c3f806 commit 5036207

File tree

4 files changed

+20
-10
lines changed

4 files changed

+20
-10
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@ Bug Fixes to Attribute Support
138138
Bug Fixes to C++ Support
139139
^^^^^^^^^^^^^^^^^^^^^^^^
140140

141+
- Fixed a crash when an expression with a dependent ``__typeof__`` type is used as the operand of a unary operator. (#GH97646)
142+
141143
Bug Fixes to AST Handling
142144
^^^^^^^^^^^^^^^^^^^^^^^^^
143145

clang/test/SemaCXX/decltype.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,3 +146,11 @@ class conditional {
146146
// FIXME: The diagnostics here are produced twice.
147147
void foo(conditional<decltype((1),int>) { // expected-note 2 {{to match this '('}} expected-error {{expected ')'}} expected-note 2{{to match this '<'}}
148148
} // expected-error {{expected function body after function declarator}} expected-error 2 {{expected '>'}} expected-error {{expected ')'}}
149+
150+
namespace GH97646 {
151+
template<bool B>
152+
void f() {
153+
decltype(B) x = false;
154+
!x;
155+
}
156+
}

clang/test/SemaCXX/dependent-typeof.cpp

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

clang/test/SemaCXX/typeof_unqual.cpp renamed to clang/test/SemaCXX/typeof.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,13 @@
33
typeof_unqual(int) u = 12; // expected-error {{expected function body after function declarator}}
44
__typeof_unqual(int) _u = 12;
55
__typeof_unqual__(int) __u = 12;
6+
7+
namespace GH97646 {
8+
template<bool B>
9+
void f() {
10+
__typeof__(B) x = false;
11+
__typeof_unqual__(B) y = false;
12+
!x;
13+
!y;
14+
}
15+
}

0 commit comments

Comments
 (0)