aaron.ballman requested changes to this revision.
aaron.ballman added inline comments.
This revision now requires changes to proceed.
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:2921
+def warn_availability_on_implementation_not_interface : Warning<
+ "method declarati
ahatanak accepted this revision.
ahatanak added a comment.
LGTM
Comment at: lib/Sema/SemaDeclAttr.cpp:2295
+ MissingIntroduced =
+ MissingIntroduced ? Decl->getIntroduced().empty() : false;
+ MissingDeprecated =
I feel like using "if" is easi
erik.pilkington accepted this revision.
erik.pilkington added a comment.
This revision is now accepted and ready to land.
> It's harder as we don't know the distinction between declaration/definition
> at merge time. Right now the C++ implementation of this warning actually
> checks the attribut
arphaman updated this revision to Diff 122949.
arphaman added a comment.
Remove C++ support for now (it will be in a followup patch along with
non-member function support).
Repository:
rL LLVM
https://reviews.llvm.org/D39913
Files:
include/clang/Basic/DiagnosticSemaKinds.td
include/clan
arphaman added a comment.
In https://reviews.llvm.org/D39913#924131, @ahatanak wrote:
> Is it not necessary to print a diagnostic when a non-member function
> declaration is missing an availability attribute?
>
> void foo1();
>
> __attribute__((availability(macos, introduced=10.1)))
> vo
ahatanak added a comment.
Is it not necessary to print a diagnostic when a non-member function
declaration is missing an availability attribute?
void foo1();
__attribute__((availability(macos, introduced=10.1)))
void foo1() {
}
Repository:
rL LLVM
https://reviews.llvm.org/D39913
arphaman added inline comments.
Comment at: lib/Sema/SemaDeclAttr.cpp:2300
+ };
+
+ llvm::SmallPtrSet MissingPlatformAttributes;
erik.pilkington wrote:
> I hate to rewrite your function, but have you considered just doing the
> second loop over the attrs inlin
arphaman updated this revision to Diff 122740.
arphaman added a comment.
- formatting
- simplify checks
- support c++
Repository:
rL LLVM
https://reviews.llvm.org/D39913
Files:
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Sema/Sema.h
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDec
erik.pilkington added a comment.
Any thoughts on having this for regular functions and C++ member functions?
Seems just as useful there.
Comment at: include/clang/Sema/Sema.h:2406
+ /// This will warn on any missing clauses in the declaration.
+ void checkMissingAvailability
arphaman created this revision.
Herald added a subscriber: javed.absar.
This patch extends the -Wavailability warning to warn about cases where a
method declaration is missing an availability attribute clause that's present
in the method's definition. We also warn about missing `deprecated` attr
10 matches
Mail list logo