]> granicus.if.org Git - clang/commitdiff
NFC: Make this test kinder on downstream forks
authorErik Pilkington <erik.pilkington@gmail.com>
Tue, 4 Dec 2018 00:31:31 +0000 (00:31 +0000)
committerErik Pilkington <erik.pilkington@gmail.com>
Tue, 4 Dec 2018 00:31:31 +0000 (00:31 +0000)
Downstream forks that have their own attributes often run into this
test failing when a new attribute is added to clang because the
number of supported attributes no longer match. This is redundant
information for this test, so we can get by without it.

rdar://46288577

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

test/Misc/pragma-attribute-supported-attributes-list.test
utils/TableGen/ClangAttrEmitter.cpp

index aa51cbfb08f557f5971f1545f069aa12cd4b1ca9..48a6bac1875213ba8e7770954a7d09560ab24eb8 100644 (file)
@@ -2,7 +2,7 @@
 
 // The number of supported attributes should never go down!
 
-// CHECK: #pragma clang attribute supports 133 attributes:
+// CHECK: #pragma clang attribute supports the following attributes:
 // CHECK-NEXT: AMDGPUFlatWorkGroupSize (SubjectMatchRule_function)
 // CHECK-NEXT: AMDGPUNumSGPR (SubjectMatchRule_function)
 // CHECK-NEXT: AMDGPUNumVGPR (SubjectMatchRule_function)
 // CHECK-NEXT: WorkGroupSizeHint (SubjectMatchRule_function)
 // CHECK-NEXT: XRayInstrument (SubjectMatchRule_function, SubjectMatchRule_objc_method)
 // CHECK-NEXT: XRayLogArgs (SubjectMatchRule_function, SubjectMatchRule_objc_method)
+// CHECK-NEXT: End of supported attributes.
index 43e6638f7f4728f2c9f8306b895c74c9b4bb6e80..70dfacc305315a2326b5a735636b632a80e8bdeb 100644 (file)
@@ -3977,12 +3977,7 @@ void EmitTestPragmaAttributeSupportedAttributes(RecordKeeper &Records,
                                                 raw_ostream &OS) {
   PragmaClangAttributeSupport Support = getPragmaAttributeSupport(Records);
   ParsedAttrMap Attrs = getParsedAttrList(Records);
-  unsigned NumAttrs = 0;
-  for (const auto &I : Attrs) {
-    if (Support.isAttributedSupported(*I.second))
-      ++NumAttrs;
-  }
-  OS << "#pragma clang attribute supports " << NumAttrs << " attributes:\n";
+  OS << "#pragma clang attribute supports the following attributes:\n";
   for (const auto &I : Attrs) {
     if (!Support.isAttributedSupported(*I.second))
       continue;
@@ -4014,6 +4009,7 @@ void EmitTestPragmaAttributeSupportedAttributes(RecordKeeper &Records,
     }
     OS << ")\n";
   }
+  OS << "End of supported attributes.\n";
 }
 
 } // end namespace clang