summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorErik Pilkington <erik.pilkington@gmail.com>2018-12-04 00:31:31 +0000
committerErik Pilkington <erik.pilkington@gmail.com>2018-12-04 00:31:31 +0000
commit23c48c282307ba3bdea1ca4ed94bc069fa108656 (patch)
tree4ee3f1181be981b49d98112b9f57c07ba28b177d /clang
parentef7657754d6adf81cb9a7b404c973d25c39ff79d (diff)
downloadbcm5719-llvm-23c48c282307ba3bdea1ca4ed94bc069fa108656.tar.gz
bcm5719-llvm-23c48c282307ba3bdea1ca4ed94bc069fa108656.zip
NFC: Make this test kinder on downstream forks
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 llvm-svn: 348218
Diffstat (limited to 'clang')
-rw-r--r--clang/test/Misc/pragma-attribute-supported-attributes-list.test3
-rw-r--r--clang/utils/TableGen/ClangAttrEmitter.cpp8
2 files changed, 4 insertions, 7 deletions
diff --git a/clang/test/Misc/pragma-attribute-supported-attributes-list.test b/clang/test/Misc/pragma-attribute-supported-attributes-list.test
index aa51cbfb08f..48a6bac1875 100644
--- a/clang/test/Misc/pragma-attribute-supported-attributes-list.test
+++ b/clang/test/Misc/pragma-attribute-supported-attributes-list.test
@@ -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)
@@ -136,3 +136,4 @@
// 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.
diff --git a/clang/utils/TableGen/ClangAttrEmitter.cpp b/clang/utils/TableGen/ClangAttrEmitter.cpp
index 43e6638f7f4..70dfacc3053 100644
--- a/clang/utils/TableGen/ClangAttrEmitter.cpp
+++ b/clang/utils/TableGen/ClangAttrEmitter.cpp
@@ -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
OpenPOWER on IntegriCloud