[PATCH] D70203: [AST] Attach comment in `/** doc */ typedef struct A {} B` to B as well as A.
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 14 00:05:42 PST 2019
kadircet added inline comments.
================
Comment at: clang/test/Index/annotate-comments-typedef.m:20
} MyEnum;
-// CHECK: TypedefDecl=MyEnum:[[@LINE-1]]:3 (Definition) FullCommentAsHTML=[<p class="para-brief"> Documentation for MyEnum </p>] FullCommentAsXML=[<Typedef file="{{[^"]+}}annotate-comments-typedef.m" line="[[@LINE-1]]" column="3"><Name><anonymous></Name><USR>c:@EA at MyEnum</USR><Declaration>typedef enum MyEnum MyEnum</Declaration><Abstract><Para> Documentation for MyEnum </Para></Abstract></Typedef>]
+// CHECK: TypedefDecl=MyEnum:[[@LINE-1]]:3 (Definition) {{.*}} FullCommentAsHTML=[<p class="para-brief"> Documentation for MyEnum </p>] FullCommentAsXML=[<Typedef file="{{[^"]+}}annotate-comments-typedef.m" line="[[@LINE-1]]" column="3"><Name>MyEnum</Name><USR>c:@T at MyEnum</USR><Declaration>typedef enum MyEnum MyEnum</Declaration><Abstract><Para> Documentation for MyEnum </Para></Abstract></Typedef>]
----------------
sorry for being dense, what exactly is the change here ? it looks like comment was already being attributed to `MyEnum`.
As for the USR I agree that this looks a whole lot better, apparently for anon decls USR contains the name of the typedef decl instead.
What is the extra text that we don't care in between?
================
Comment at: clang/test/Sema/warn-documentation.cpp:871
-// expected-warning at +1 {{empty paragraph passed to '\brief' command}}
+// expected-warning at +1 + {{empty paragraph passed to '\brief' command}}
/// \brief\author Aaa
----------------
what is the ` + ` for ?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70203/new/
https://reviews.llvm.org/D70203
More information about the cfe-commits
mailing list