summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/pr61941.C
blob: 5485b982cc7bc08fd26caabd3f4d484664ec68b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// PR c++/61941 - Misparsing of warn_unused_result function with ref-qualifiers
// { dg-do compile { target c++11 } }
// { dg-options "-Wall" }

class S
{
public:
    S x() const __attribute__ ((__warn_unused_result__));

    S y() const & __attribute__ ((__warn_unused_result__));
    S y() && __attribute__ ((__warn_unused_result__));
};