[cfe-commits] r64447 - in /cfe/trunk: lib/Sema/SemaDeclAttr.cpp test/Sema/attr-deprecated.c
Anders Carlsson
andersca at mac.com
Fri Feb 13 00:22:04 PST 2009
Author: andersca
Date: Fri Feb 13 02:22:04 2009
New Revision: 64447
URL: http://llvm.org/viewvc/llvm-project?rev=64447&view=rev
Log:
Start warning about unknown attributes.
Modified:
cfe/trunk/lib/Sema/SemaDeclAttr.cpp
cfe/trunk/test/Sema/attr-deprecated.c
Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclAttr.cpp?rev=64447&r1=64446&r2=64447&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclAttr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclAttr.cpp Fri Feb 13 02:22:04 2009
@@ -1376,10 +1376,7 @@
// 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;
}
}
Modified: cfe/trunk/test/Sema/attr-deprecated.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-deprecated.c?rev=64447&r1=64446&r2=64447&view=diff
==============================================================================
--- cfe/trunk/test/Sema/attr-deprecated.c (original)
+++ cfe/trunk/test/Sema/attr-deprecated.c Fri Feb 13 02:22:04 2009
@@ -4,7 +4,7 @@
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));
More information about the cfe-commits
mailing list