Home
last modified time | relevance | path

Searched refs:test_bounds (Results 1 – 2 of 2) sorted by relevance

/llvm-project/clang/test/SemaCXX/
H A Dconstant-expression-cxx14.cpp474 constexpr const char *test_bounds(const char *p, int o) { in test_bounds() function
477 static_assert(test_bounds("foo", 0)[0] == 'f', "");
478 static_assert(test_bounds("foo", 3)[0] == 0, "");
479 static_assert(test_bounds("foo", 4)[-3] == 'o', "");
480 static_assert(test_bounds(&"foo"[4], -4)[0] == 'f', "");
481 static_assert(test_bounds("foo", 5) != 0, ""); // expected-error {{constant}} expected-note {{call}}
482 static_assert(test_bounds("foo", -1) != 0, ""); // expected-error {{constant}} expected-note {{call}}
483 static_assert(test_bounds("foo", 1000) != 0, ""); // expected-error {{constant}} expected-note {{call}}
/llvm-project/clang/test/Sema/
H A Derror-type-safety.cpp35 void test_bounds() in test_bounds() function