Skip to content

Commit 69c13c3

Browse files
committed
AST: Suppress -Wunused for allowFeatureSuppression().
1 parent e3d381b commit 69c13c3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/AST/FeatureSet.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -728,13 +728,19 @@ static bool hasFeatureSuppressionAttribute(Decl *decl, StringRef featureName,
728728
return false;
729729
}
730730

731+
// These functions are only used when there suppressible language features
732+
// defined, so suppress warnings about them being unused to avoid spam when
733+
// there are none.
734+
#pragma clang diagnostic push
735+
#pragma clang diagnostic ignored "-Wunused"
731736
static bool disallowFeatureSuppression(StringRef featureName, Decl *decl) {
732737
return hasFeatureSuppressionAttribute(decl, featureName, true);
733738
}
734739

735740
static bool allowFeatureSuppression(StringRef featureName, Decl *decl) {
736741
return hasFeatureSuppressionAttribute(decl, featureName, false);
737742
}
743+
#pragma clang diagnostic pop
738744

739745
/// Go through all the features used by the given declaration and
740746
/// either add or remove them to this set.

0 commit comments

Comments
 (0)