[cfe-commits] r96431 - in /cfe/trunk: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/TargetAttributesSema.cpp test/Sema/x86-attr-force-align-arg-pointer.c
Charles Davis
cdavis at mines.edu
Tue Feb 16 16:44:47 PST 2010
Author: cdavis
Date: Tue Feb 16 18:44:47 2010
New Revision: 96431
URL: http://llvm.org/viewvc/llvm-project?rev=96431&view=rev
Log:
Revert r95939, as suggested by Alexandre Julliard from the Wine project (and
our own Chris Lattner).
Modified:
cfe/trunk/include/clang/Basic/DiagnosticGroups.td
cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
cfe/trunk/lib/Sema/TargetAttributesSema.cpp
cfe/trunk/test/Sema/x86-attr-force-align-arg-pointer.c
Modified: cfe/trunk/include/clang/Basic/DiagnosticGroups.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticGroups.td?rev=96431&r1=96430&r2=96431&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticGroups.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticGroups.td Tue Feb 16 18:44:47 2010
@@ -120,7 +120,6 @@
def VolatileRegisterVar : DiagGroup<"volatile-register-var">;
def : DiagGroup<"write-strings">;
def CharSubscript : DiagGroup<"char-subscripts">;
-def ForceAlignArgPointer : DiagGroup<"force-align-arg-pointer">;
// Aggregation warning settings.
@@ -181,4 +180,4 @@
// A warning group for warnings that we want to have on by default in clang,
// but which aren't on by default in GCC.
def NonGCC : DiagGroup<"non-gcc",
- [SignCompare, Conversion, ForceAlignArgPointer]>;
+ [SignCompare, Conversion]>;
Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=96431&r1=96430&r2=96431&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Tue Feb 16 18:44:47 2010
@@ -730,9 +730,6 @@
def warn_redeclaration_without_attribute_prev_attribute_ignored : Warning<
"'%0' redeclared without %1 attribute: previous %1 ignored">;
def warn_attribute_ignored : Warning<"%0 attribute ignored">;
-def warn_faap_attribute_ignored : Warning<
- "force_align_arg_pointer used on function pointer; attribute ignored">,
- InGroup<ForceAlignArgPointer>;
def warn_attribute_precede_definition : Warning<
"attribute declaration must precede definition">;
def warn_attribute_void_function : Warning<
Modified: cfe/trunk/lib/Sema/TargetAttributesSema.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/TargetAttributesSema.cpp?rev=96431&r1=96430&r2=96431&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/TargetAttributesSema.cpp (original)
+++ cfe/trunk/lib/Sema/TargetAttributesSema.cpp Tue Feb 16 18:44:47 2010
@@ -79,14 +79,12 @@
return;
}
- // If we try to apply it to a function pointer, warn. This is a special
- // instance of the warn_attribute_ignored warning that can be turned
- // off with -Wno-force-align-arg-pointer.
+ // If we try to apply it to a function pointer, don't warn, but don't
+ // do anything, either. It doesn't matter anyway, because there's nothing
+ // special about calling a force_align_arg_pointer function.
ValueDecl* VD = dyn_cast<ValueDecl>(D);
- if (VD && VD->getType()->isFunctionPointerType()) {
- S.Diag(Attr.getLoc(), diag::warn_faap_attribute_ignored);
+ if (VD && VD->getType()->isFunctionPointerType())
return;
- }
// Attribute can only be applied to function types.
if (!isa<FunctionDecl>(D)) {
S.Diag(Attr.getLoc(), diag::warn_attribute_wrong_decl_type)
Modified: cfe/trunk/test/Sema/x86-attr-force-align-arg-pointer.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/x86-attr-force-align-arg-pointer.c?rev=96431&r1=96430&r2=96431&view=diff
==============================================================================
--- cfe/trunk/test/Sema/x86-attr-force-align-arg-pointer.c (original)
+++ cfe/trunk/test/Sema/x86-attr-force-align-arg-pointer.c Tue Feb 16 18:44:47 2010
@@ -14,5 +14,5 @@
void __attribute__((force_align_arg_pointer)) d(void) {}
// Attribute is ignored on function pointer types.
-void (__attribute__((force_align_arg_pointer)) *p)(); //expected-warning{{force_align_arg_pointer used on function pointer; attribute ignored}}
+void (__attribute__((force_align_arg_pointer)) *p)();
More information about the cfe-commits
mailing list