[all-commits] [llvm/llvm-project] a433e7: [AST] Attach comment in `/** doc */ typedef struct...
Sam McCall via All-commits
all-commits at lists.llvm.org
Mon Nov 18 02:09:51 PST 2019
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: a433e7141fb3f697e6430437ee73b19076603c1b
https://github.com/llvm/llvm-project/commit/a433e7141fb3f697e6430437ee73b19076603c1b
Author: Sam McCall <sam.mccall at gmail.com>
Date: 2019-11-18 (Mon, 18 Nov 2019)
Changed paths:
M clang-tools-extra/clangd/unittests/XRefsTests.cpp
M clang/lib/AST/ASTContext.cpp
M clang/test/Index/annotate-comments-typedef.m
M clang/test/Sema/warn-documentation.cpp
Log Message:
-----------
[AST] Attach comment in `/** doc */ typedef struct A {} B` to B as well as A.
Summary:
Semantically they're the same thing, and it's important when the underlying
struct is anonymous.
There doesn't seem to be a problem attaching the same comment to multiple things
as it already happens with `/** doc */ int a, b;`
This affects an Index test but the results look better (name present, USR points
to the typedef).
Fixes https://github.com/clangd/clangd/issues/189
Reviewers: kadircet, lh123
Subscribers: ilya-biryukov, jkorous, arphaman, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D70203
More information about the All-commits
mailing list