[clang] [clang] Prioritze decl comments from macro expansion site (PR #65481)

Daniel Grumberg via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 7 07:36:50 PDT 2023


================
@@ -179,103 +179,38 @@ static SourceLocation getDeclLocForCommentSearch(const Decl *D,
       isa<ClassTemplateSpecializationDecl>(D) ||
       // Allow association with Y across {} in `typedef struct X {} Y`.
       isa<TypedefDecl>(D))
-    return D->getBeginLoc();
+    return {D->getBeginLoc()};
----------------
daniel-grumberg wrote:

Yeah that is definitely neater, went for something along those lines in the updated patch.

https://github.com/llvm/llvm-project/pull/65481


More information about the cfe-commits mailing list