From b235caa53b6743fda9f749a8218760c024e4cf9e Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Fri, 13 Feb 2009 08:22:04 +0000 Subject: [PATCH] Start warning about unknown attributes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64447 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaDeclAttr.cpp | 3 --- test/Sema/attr-deprecated.c | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp index b585bd544b..491579c813 100644 --- a/lib/Sema/SemaDeclAttr.cpp +++ b/lib/Sema/SemaDeclAttr.cpp @@ -1376,10 +1376,7 @@ static void ProcessDeclAttribute(Decl *D, const AttributeList &Attr, Sema &S) { // Just ignore break; default: -#if 0 - // TODO: when we have the full set of attributes, warn about unknown ones. S.Diag(Attr.getLoc(), diag::warn_attribute_ignored) << Attr.getName(); -#endif break; } } diff --git a/test/Sema/attr-deprecated.c b/test/Sema/attr-deprecated.c index f018c3356f..c1a3ae3066 100644 --- a/test/Sema/attr-deprecated.c +++ b/test/Sema/attr-deprecated.c @@ -4,7 +4,7 @@ int f() __attribute__((deprecated)); void g() __attribute__((deprecated)); void g(); -void z() __attribute__((bogusattr)); // todo-warning {{'bogusattr' attribute ignored}} +void z() __attribute__((bogusattr)); // expected-warning {{'bogusattr' attribute ignored}} extern int var __attribute__((deprecated)); -- 2.50.1