Skip to content

Commit d046919

Browse files
committed
Address comments
1 parent e8a0c87 commit d046919

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

clang/test/SemaCXX/builtin-invoke.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,14 @@ class std::reference_wrapper<InvalidSpecialization2> {
7272
InvalidSpecialization2& get(); // expected-note 2 {{declared private here}}
7373
};
7474

75+
struct Incomplete; // expected-note {{forward declaration}}
76+
struct Incomplete2;
77+
78+
void incomplete_test(Incomplete& incomplete) {
79+
__builtin_invoke((int (Incomplete2::*)){}, incomplete); // expected-error {{incomplete type 'Incomplete' used in type trait expression}} \
80+
expected-error {{indirection requires pointer operand ('Incomplete' invalid)}}
81+
}
82+
7583
void call() {
7684
__builtin_invoke(func);
7785
__builtin_invoke(nfunc);

0 commit comments

Comments
 (0)