brintos

brintos / llvm-project-archived public Read only

0
0
Text · 543 B · c386693 Raw
9 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -verify -std=c++17 %s2 3struct Weak {4    [[gnu::weak]]void weak_method();5};6static_assert([](){ return &Weak::weak_method != nullptr; }()); // expected-error {{static assertion expression is not an integral constant expression}} \7                                                                // expected-note {{comparison against pointer to weak member 'Weak::weak_method' can only be performed at runtime}} \8                                                                // expected-note {{in call to}}9