Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions clang/docs/ReleaseNotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,8 @@ Bug Fixes to C++ Support
authentication enabled. (#GH152601)
- Fix the check for narrowing int-to-float conversions, so that they are detected in
cases where converting the float back to an integer is undefined behaviour (#GH157067).
- Stop rejecting C++11-style attributes on the first argument of constructors in older
standards. (#GH156809).
- Fix a crash when applying binary or ternary operators to two same function types with different spellings,
where at least one of the function parameters has an attribute which affects
the function type.
Expand Down
7 changes: 3 additions & 4 deletions clang/lib/Parse/ParseDecl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6007,10 +6007,9 @@ bool Parser::isConstructorDeclarator(bool IsUnqualified, bool DeductionGuide,

// A C++11 attribute here signals that we have a constructor, and is an
// attribute on the first constructor parameter.
if (getLangOpts().CPlusPlus11 &&
isCXX11AttributeSpecifier(/*Disambiguate*/ false,
/*OuterMightBeMessageSend*/ true) !=
CXX11AttributeKind::NotAttributeSpecifier) {
if (isCXX11AttributeSpecifier(/*Disambiguate=*/false,
/*OuterMightBeMessageSend=*/true) !=
CXX11AttributeKind::NotAttributeSpecifier) {
return true;
}

Expand Down
6 changes: 6 additions & 0 deletions clang/test/Parser/cxx03-attributes.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++03 %s
// expected-no-diagnostics

struct S {
S([[clang::lifetimebound]] int&) {}
};
Loading