]> granicus.if.org Git - clang/commitdiff
Revert r95939, as suggested by Alexandre Julliard from the Wine project (and
authorCharles Davis <cdavis@mines.edu>
Wed, 17 Feb 2010 00:44:47 +0000 (00:44 +0000)
committerCharles Davis <cdavis@mines.edu>
Wed, 17 Feb 2010 00:44:47 +0000 (00:44 +0000)
our own Chris Lattner).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96431 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticGroups.td
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/TargetAttributesSema.cpp
test/Sema/x86-attr-force-align-arg-pointer.c

index 3fb011c28bde88d9e27061b9897cdf9ca4acda0f..918f13e2b418e49cab38f6586232eb5df672dc46 100644 (file)
@@ -120,7 +120,6 @@ def VectorConversions : DiagGroup<"vector-conversions">;      // clang specific
 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 @@ def : DiagGroup<"comments", [Comment]>;         // -Wcomments = -Wcomment
 // 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]>;
index 3af80e4c1b7cc3ecee87fc3965004ffed249207a..a37177ba344da75d02cd27dd971f8cf9f89cb39e 100644 (file)
@@ -730,9 +730,6 @@ def err_attribute_aligned_not_power_of_two : Error<
 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<
index 597a0276966d00eb54628182bb48a99916942b8b..76cff1f31518aab11e748e55767da4f77ea0e6aa 100644 (file)
@@ -79,14 +79,12 @@ static void HandleX86ForceAlignArgPointerAttr(Decl *D,
     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)
index 9609fadf7febf6f5150807bf230df106c577cc0b..1470544a69719fc95a8123768eb71612a102a37e 100644 (file)
@@ -14,5 +14,5 @@ void d(void);
 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)();