[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH v2 2/6] audio/coreaudio: Remove a deprecation warning on
From: |
Christian Schoenebeck |
Subject: |
Re: [RFC PATCH v2 2/6] audio/coreaudio: Remove a deprecation warning on macOS 12 |
Date: |
Tue, 11 Jan 2022 13:51:20 +0100 |
On Dienstag, 11. Januar 2022 13:35:05 CET Christian Schoenebeck wrote:
> Curiousity was stronger: the original clang behaviour was as I explained:
> https://github.com/llvm-mirror/clang/commit/0a0d2b179085a52c10402feebeb6db8b
> 4d96a140#diff-97c4322e86bf436b7f79f4fcafc4b7beb092da08c5c23f294f98b5bb0a7f9a
> 31
>
> Quote:
>
> "
> For example,
>
> void foo()
>
> __attribute__((availability(macosx,introduced=10.2,deprecated=10.4,obsolete
> d=10.6)));
>
> ...
>
> - If we choose a deployment target >= Mac OS X 10.4, uses of "foo"
> will result in a deprecation warning, as if we had placed
> attribute((deprecated)) on it ...
> "
>
> Relevant code section (in that original commit):
>
> static AvailabilityResult CheckAvailability(ASTContext &Context,
> const AvailabilityAttr *A,
> std::string *Message) {
> ...
> VersionTuple TargetMinVersion = Context.Target.getPlatformMinVersion();
> ...
> // Make sure that this declaration hasn't been deprecated.
> if (!A->getDeprecated().empty() && TargetMinVersion >= A->getDeprecated())
Stupid me, you are right. No deprecated warning unless minimum deployment
target is >= the attribute's deprecated version.
So it was always like this. My bad. :)
> { if (Message) {
> Message->clear();
> llvm::raw_string_ostream Out(*Message);
> Out << "first deprecated in " << PrettyPlatformName << ' '
> << A->getDeprecated();
> }
>
> return AR_Deprecated;
> }
> ...
> }
Best regards,
Christian Schoenebeck
- Re: [RFC PATCH v2 2/6] audio/coreaudio: Remove a deprecation warning on macOS 12, (continued)
- Re: [RFC PATCH v2 2/6] audio/coreaudio: Remove a deprecation warning on macOS 12, Peter Maydell, 2022/01/10
- Re: [RFC PATCH v2 2/6] audio/coreaudio: Remove a deprecation warning on macOS 12, Akihiko Odaki, 2022/01/10
- Re: [RFC PATCH v2 2/6] audio/coreaudio: Remove a deprecation warning on macOS 12, Christian Schoenebeck, 2022/01/10
- Re: [RFC PATCH v2 2/6] audio/coreaudio: Remove a deprecation warning on macOS 12, Akihiko Odaki, 2022/01/10
- Re: [RFC PATCH v2 2/6] audio/coreaudio: Remove a deprecation warning on macOS 12, Peter Maydell, 2022/01/10
- Re: [RFC PATCH v2 2/6] audio/coreaudio: Remove a deprecation warning on macOS 12, Christian Schoenebeck, 2022/01/10
- Re: [RFC PATCH v2 2/6] audio/coreaudio: Remove a deprecation warning on macOS 12, Akihiko Odaki, 2022/01/10
- Re: [RFC PATCH v2 2/6] audio/coreaudio: Remove a deprecation warning on macOS 12, Christian Schoenebeck, 2022/01/10
- Re: [RFC PATCH v2 2/6] audio/coreaudio: Remove a deprecation warning on macOS 12, Akihiko Odaki, 2022/01/10
- Re: [RFC PATCH v2 2/6] audio/coreaudio: Remove a deprecation warning on macOS 12, Christian Schoenebeck, 2022/01/11
- Re: [RFC PATCH v2 2/6] audio/coreaudio: Remove a deprecation warning on macOS 12,
Christian Schoenebeck <=
[RFC PATCH v2 3/6] block/file-posix: Remove a deprecation warning on macOS 12, Philippe Mathieu-Daudé, 2022/01/09
[RFC PATCH v2 4/6] hvf: Make hvf_get_segments() / hvf_put_segments() local, Philippe Mathieu-Daudé, 2022/01/09
[RFC PATCH v2 5/6] hvf: Remove deprecated hv_vcpu_flush() calls, Philippe Mathieu-Daudé, 2022/01/09
[PATCH v2 6/6] gitlab-ci: Support macOS 12 via cirrus-run, Philippe Mathieu-Daudé, 2022/01/09