@@ -672,12 +672,13 @@ static Attr *ProcessStmtAttribute(Sema &S, Stmt *St,
const ParsedAttr &A,
!(A.existsInTarget(S.Context.getTargetInfo()) ||
(S.Context.getLangOpts().SYCLIsDevice && Aux &&
A.existsInTarget(*Aux {
-S.Diag(A.getLoc(), A.isRegul
@@ -7867,15 +7865,16 @@ void Sema::checkUnusedDeclAttributes(Declarator &D) {
void Sema::DiagnoseUnknownAttribute(const ParsedAttr &AL) {
std::string NormalizedFullName = '\'' + AL.getNormalizedFullName() + '\'';
+ SourceRange NR = AL.getNormalizedRange();
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/141305
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1842,8 +1842,7 @@ void Parser::ProhibitCXX11Attributes(ParsedAttributes
&Attrs,
continue;
if (AL.getKind() == ParsedAttr::UnknownAttribute) {
if (WarnOnUnknownAttrs)
-Diag(AL.getLoc(), diag::warn_unknown_attribute_ignored)
-<< AL << AL.g
https://github.com/erichkeane commented:
I'm really in favor of this direction, this is great, thank you!
I have a few suggestions here (and if there is good reason, feel free to ignore
the ones re return-type & setting invalid in particular), but this is pretty
good for me.
https://github.co
@@ -7867,15 +7867,16 @@ void Sema::checkUnusedDeclAttributes(Declarator &D) {
void Sema::DiagnoseUnknownAttribute(const ParsedAttr &AL) {
std::string NormalizedFullName = '\'' + AL.getNormalizedFullName() + '\'';
+ SourceRange NR = AL.getNormalizedRange();
+ SourceLocation
https://github.com/a-tarasyuk edited
https://github.com/llvm/llvm-project/pull/141305
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -7867,15 +7867,16 @@ void Sema::checkUnusedDeclAttributes(Declarator &D) {
void Sema::DiagnoseUnknownAttribute(const ParsedAttr &AL) {
std::string NormalizedFullName = '\'' + AL.getNormalizedFullName() + '\'';
+ SourceRange NR = AL.getNormalizedRange();
+ SourceLocation
@@ -0,0 +1,32 @@
+// RUN: %clang_cc1 -Wunknown-attributes -fsyntax-only -verify %s
+// RUN: %clang_cc1 -Wunknown-attributes -fsyntax-only
-fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s
+
+[[gmu::deprected]] // expected-warning {{unknown attribute 'gmu::deprected'
ignored;
@@ -0,0 +1,32 @@
+// RUN: %clang_cc1 -Wunknown-attributes -fsyntax-only -verify %s
+// RUN: %clang_cc1 -Wunknown-attributes -fsyntax-only
-fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s
+
+[[gmu::deprected]] // expected-warning {{unknown attribute 'gmu::deprected'
ignored;
@@ -7867,15 +7867,16 @@ void Sema::checkUnusedDeclAttributes(Declarator &D) {
void Sema::DiagnoseUnknownAttribute(const ParsedAttr &AL) {
std::string NormalizedFullName = '\'' + AL.getNormalizedFullName() + '\'';
+ SourceRange NR = AL.getNormalizedRange();
+ SourceLocation
a-tarasyuk wrote:
@zwuis Thanks for the feedback. I've added additional tests to cover this case
https://github.com/llvm/llvm-project/pull/141305
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cf
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/141305
>From 2b84b21462a4e66b8681e165fcd24e3107612448 Mon Sep 17 00:00:00 2001
From: Oleksandr Tarasiuk
Date: Sat, 24 May 2025 02:52:24 +0300
Subject: [PATCH 1/2] [Clang] add fix-it hints for unknown attributes
---
zwuis wrote:
Can you handle this case `[[using gnu : deprected]]`?
https://github.com/llvm/llvm-project/pull/141305
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/a-tarasyuk created
https://github.com/llvm/llvm-project/pull/141305
This patch adds fix-it hints for unknown attribute names when Clang suggests a
correction
>From 2b84b21462a4e66b8681e165fcd24e3107612448 Mon Sep 17 00:00:00 2001
From: Oleksandr Tarasiuk
Date: Sat, 24 May 2
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Oleksandr T. (a-tarasyuk)
Changes
This patch adds fix-it hints for unknown attribute names when Clang suggests a
correction
---
Full diff: https://github.com/llvm/llvm-project/pull/141305.diff
3 Files Affected:
- (modified) clang/docs/
16 matches
Mail list logo