1 //===----------------------------------------------------------------------===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is dual licensed under the MIT and the University of Illinois Open 6 // Source Licenses. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 11 12 // #include <memory> 13 14 // template<size_t N, class T> 15 // [[nodiscard]] constexpr T* assume_aligned(T* ptr); 16 17 #include <memory> 18 19 void f() { 20 int *p = nullptr; 21 std::assume_aligned<4>(p); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} 22 } 23