summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/DelayedDiagnostic.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/DelayedDiagnostic.cpp')
-rw-r--r--clang/lib/Sema/DelayedDiagnostic.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/clang/lib/Sema/DelayedDiagnostic.cpp b/clang/lib/Sema/DelayedDiagnostic.cpp
index 31004328855..533b7ef3e87 100644
--- a/clang/lib/Sema/DelayedDiagnostic.cpp
+++ b/clang/lib/Sema/DelayedDiagnostic.cpp
@@ -19,13 +19,22 @@
using namespace clang;
using namespace sema;
-DelayedDiagnostic DelayedDiagnostic::makeDeprecation(SourceLocation Loc,
+DelayedDiagnostic
+DelayedDiagnostic::makeAvailability(Sema::AvailabilityDiagnostic AD,
+ SourceLocation Loc,
const NamedDecl *D,
const ObjCInterfaceDecl *UnknownObjCClass,
const ObjCPropertyDecl *ObjCProperty,
StringRef Msg) {
DelayedDiagnostic DD;
- DD.Kind = Deprecation;
+ switch (AD) {
+ case Sema::AD_Deprecation:
+ DD.Kind = Deprecation;
+ break;
+ case Sema::AD_Unavailable:
+ DD.Kind = Unavailable;
+ break;
+ }
DD.Triggered = false;
DD.Loc = Loc;
DD.DeprecationData.Decl = D;
OpenPOWER on IntegriCloud