[PATCH] D71141: [Wdocumentation] Use C2x/C++14 deprecated attribute
Mark de Wever via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 9 12:44:08 PST 2019
Mordante marked 5 inline comments as done.
Mordante added a comment.
Thanks for your review of this set of patches!
================
Comment at: clang/lib/AST/CommentSema.cpp:698
+ // - In C2x/C++14 we prefer [[deprecated]]
+ // - If not found or an older C/C++ look for __attribute__((deprecated))
+ StringRef MacroName;
----------------
gribozavr2 wrote:
> I know I'm nit-picking, but I'd appreciate periods at the end of sentences.
No problem, I added them.
================
Comment at: clang/test/Sema/warn-documentation-fixits.c:27
+
+// CHECK: fix-it:"{{.*}}":{7:1-7:1}:"[[ATTRIBUTE]] "
+// CHECK: fix-it:"{{.*}}":{11:1-11:1}:"[[ATTRIBUTE]] "
----------------
gribozavr2 wrote:
> "[[ATTRIBUTE]]"?
>
> I expected either "[[deprecated]]" or "ATTRIBUTE".
>
> Oh, these are FileCheck's regex brackets, which make it just a literal "ATTRIBUTE"... I think it would be clearer without the brackets :)
These are not simple regex bracket, but they are substitution blocks [1]. These are defined by the RUN scrips to select between the `__attribute__((deprecated)) ` and `[[deprecated]]` replacements.
[1] https://llvm.org/docs/CommandGuide/FileCheck.html#filecheck-string-substitution-blocks
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71141/new/
https://reviews.llvm.org/D71141
More information about the cfe-commits
mailing list