[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Modules / overloadable-attrs.cpp
blob38c9558fe8821d8d6374fbe68f09f53fb072c807
1 // RUN: rm -rf %t
2 // RUN: %clang_cc1 -I%S/Inputs/overloadable-attrs -fmodules \
3 // RUN: -fmodule-map-file=%S/Inputs/overloadable-attrs/module.modulemap \
4 // RUN: -fmodules-cache-path=%t -verify %s -std=c++11
5 //
6 // Ensures that we don't merge decls with attrs that we allow overloading on.
7 //
8 // expected-no-diagnostics
10 #include "a.h"
12 static_assert(enable_if_attrs::fn1() == 1, "");
13 static_assert(enable_if_attrs::fn2() == 1, "");
14 static_assert(enable_if_attrs::fn3(0) == 0, "");
15 static_assert(enable_if_attrs::fn3(1) == 1, "");
16 static_assert(enable_if_attrs::fn4(0) == 0, "");
17 static_assert(enable_if_attrs::fn4(1) == 1, "");
18 static_assert(enable_if_attrs::fn5(0) == 0, "");
19 static_assert(enable_if_attrs::fn5(1) == 1, "");
21 static_assert(pass_object_size_attrs::fn1(nullptr) == 1, "");
22 static_assert(pass_object_size_attrs::fn2(nullptr) == 1, "");