Files
clang-p2996/clang/test/Sema/attr-ownership.cpp
Joel E. Denny 8150810556 Reland "[Attr] Fix parameter indexing for several attributes"
Relands r326602 (reverted in r326862) with new test and fix for
PR36620.

Differential Revision: https://reviews.llvm.org/D43248

llvm-svn: 327405
2018-03-13 14:51:22 +00:00

8 lines
312 B
C++

// RUN: %clang_cc1 %s -verify -fsyntax-only
class C {
void f(int, int)
__attribute__((ownership_returns(foo, 2))) // expected-note {{declared with index 2 here}}
__attribute__((ownership_returns(foo, 3))); // expected-error {{'ownership_returns' attribute index does not match; here it is 3}}
};