[all-commits] [llvm/llvm-project] b67d37: [clang] Prioritze decl comments from macro expansi...

Daniel Grumberg via All-commits all-commits at lists.llvm.org
Thu Oct 26 09:32:58 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b67d3702577d4a1848bce9be9887e554178a421a
      https://github.com/llvm/llvm-project/commit/b67d3702577d4a1848bce9be9887e554178a421a
  Author: Daniel Grumberg <dgrumberg at apple.com>
  Date:   2023-10-26 (Thu, 26 Oct 2023)

  Changed paths:
    M clang/lib/AST/ASTContext.cpp
    M clang/test/Index/annotate-comments-objc.m
    M clang/unittests/Tooling/SourceCodeTest.cpp

  Log Message:
  -----------
  [clang] Prioritze decl comments from macro expansion site (#65481)

For declarations declared inside a macro, e.g.:
```
`#define MAKE_FUNC(suffix) \
         /// Not selected doc comment \
         void func_##suffix(void) {  }

/// Doc comment foo
MAKE_FUNC(foo)

/// Doc comment bar
MAKE_FUNC(bar)
````

Prefer the doc comment at the expansion site instead of the one defined
in the macro.

rdar://113995729




More information about the All-commits mailing list