aboutsummaryrefslogtreecommitdiff
path: root/clang/test/SemaCXX/crash-lambda-weak-attr.cpp
blob: c3866930092ffcf95c210eaa5b88a401be9c4335 (plain)
1
2
3
4
5
6
7
8
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++17 %s

struct Weak {
    [[gnu::weak]]void weak_method();
};
static_assert([](){ return &Weak::weak_method != nullptr; }()); // expected-error {{static assertion expression is not an integral constant expression}} \
                                                                // expected-note {{comparison against pointer to weak member 'Weak::weak_method' can only be performed at runtime}} \
                                                                // expected-note {{in call to}}