llvm-project/clang/test/Parser/cxx03-attributes.cpp
camc e0a33cb599
[clang] Allow attributes on first constructor argument in pre-C++11 (#157300)
Resolves GH-156809

Modifies decl parser to allow C++11 style [[attributes]] on the first
argument in constructors in all C++ standards. They are already allowed
on later arguments.

---------

Co-authored-by: Shafik Yaghmour <shafik.yaghmour@intel.com>
2025-09-15 21:04:45 +08:00

7 lines
137 B
C++

// RUN: %clang_cc1 -fsyntax-only -verify -std=c++03 %s
// expected-no-diagnostics
struct S {
S([[clang::lifetimebound]] int&) {}
};