[all-commits] [llvm/llvm-project] 6b1227: [clang] Informative error for lifetimebound in dec...
Maksim Ivanov via All-commits
all-commits at lists.llvm.org
Fri Jan 10 05:17:20 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6b12272353b45def33bf5814cdf9e8587f32d40e
https://github.com/llvm/llvm-project/commit/6b12272353b45def33bf5814cdf9e8587f32d40e
Author: Maksim Ivanov <emaxx at google.com>
Date: 2025-01-10 (Fri, 10 Jan 2025)
Changed paths:
M clang/lib/Parse/ParseDecl.cpp
M clang/test/SemaCXX/attr-lifetimebound.cpp
Log Message:
-----------
[clang] Informative error for lifetimebound in decl-spec (#118567)
Emit a bit more informative error when the `[[clang::lifetimebound]]`
attribute is wrongly appearing on a decl-spec:
```
'lifetimebound' attribute only applies to parameters and implicit
object parameters
```
instead of:
```
'lifetimebound' attribute cannot be applied to types
```
The new error is also consistent with the diagnostic emitted when the
attribute is misplaced in other parts of a declarator.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list