[PATCH] D42227: [Refactor] Use enum instead of magic number in handleX86ForceAlignArgPointerAttr, NFC

Hongbin Zheng via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 17 20:13:59 PST 2018

etherzhhb created this revision.
etherzhhb added reviewers: aaron.ballman, echristo.
Herald added a subscriber: cfe-commits.

Simple change to use Use enum instead of magic number in handleX86ForceAlignArgPointerAttr. No functional change

  rC Clang



Index: lib/Sema/SemaDeclAttr.cpp
--- lib/Sema/SemaDeclAttr.cpp
+++ lib/Sema/SemaDeclAttr.cpp
@@ -5554,7 +5554,7 @@
   // Attribute can only be applied to function types.
   if (!isa<FunctionDecl>(D)) {
     S.Diag(Attr.getLoc(), diag::warn_attribute_wrong_decl_type)
-      << Attr.getName() << /* function */0;
+      << Attr.getName() << ExpectedFunction;

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42227.130353.patch
Type: text/x-patch
Size: 446 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180118/e7d51925/attachment.bin>

More information about the cfe-commits mailing list