Skip to content

Commit

Permalink
[FOLD] address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sdkrystian committed Jul 23, 2024
1 parent 7c3f806 commit 5036207
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 10 deletions.
2 changes: 2 additions & 0 deletions clang/docs/ReleaseNotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ Bug Fixes to Attribute Support
Bug Fixes to C++ Support
^^^^^^^^^^^^^^^^^^^^^^^^

- Fixed a crash when an expression with a dependent ``__typeof__`` type is used as the operand of a unary operator. (#GH97646)

Bug Fixes to AST Handling
^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down
8 changes: 8 additions & 0 deletions clang/test/SemaCXX/decltype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,11 @@ class conditional {
// FIXME: The diagnostics here are produced twice.
void foo(conditional<decltype((1),int>) { // expected-note 2 {{to match this '('}} expected-error {{expected ')'}} expected-note 2{{to match this '<'}}
} // expected-error {{expected function body after function declarator}} expected-error 2 {{expected '>'}} expected-error {{expected ')'}}

namespace GH97646 {
template<bool B>
void f() {
decltype(B) x = false;
!x;
}
}
10 changes: 0 additions & 10 deletions clang/test/SemaCXX/dependent-typeof.cpp

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,13 @@
typeof_unqual(int) u = 12; // expected-error {{expected function body after function declarator}}
__typeof_unqual(int) _u = 12;
__typeof_unqual__(int) __u = 12;

namespace GH97646 {
template<bool B>
void f() {
__typeof__(B) x = false;
__typeof_unqual__(B) y = false;
!x;
!y;
}
}

0 comments on commit 5036207

Please sign in to comment.