[PATCH] D142560: Allow getRawCommentForDecl to find comments in macros

2023-01-26 Thread Dana Jansens via Phabricator via cfe-commits
danakj added a comment. I tried modifying the test to pass an AIX target, running on Linux: // RUN: %clang_cc1 -triple powerpc64-ibm-aix -emit-pch -o %t/out.pch -F %S/Inputs/Frameworks %s // RUN: %clang_cc1 -triple powerpc64-ibm-aix -include-pch %t/out.pch -F %S/Inputs/Frameworks

[PATCH] D142560: Allow getRawCommentForDecl to find comments in macros

2023-01-26 Thread Dana Jansens via Phabricator via cfe-commits
danakj added a comment. I am not sure how to debug further for AIX, do you have any suggestion? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142560/new/ https://reviews.llvm.org/D142560 ___ cfe-commits

[PATCH] D142560: Allow getRawCommentForDecl to find comments in macros

2023-01-26 Thread Dana Jansens via Phabricator via cfe-commits
danakj added a comment. Here's the relevant part of the test: #define DECLARE_ENUMS(name) \ /** enumFromMacro IS_DOXYGEN_SINGLE */ \ enum enumFromMacro { A }; \ /** namedEnumFromMacro IS_DOXYGEN_SINGLE */ \ enum name { B }; /// IS_DOXYGEN_NOT_ATTACHED

[PATCH] D142560: Allow getRawCommentForDecl to find comments in macros

2023-01-25 Thread Dana Jansens via Phabricator via cfe-commits
danakj updated this revision to Diff 492181. danakj added a comment. Add tests for enums inside a macro, other than NS_ENUM and NS_OPTIONS Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142560/new/ https://reviews.llvm.org/D142560 Files:

[PATCH] D142560: Allow getRawCommentForDecl to find comments in macros

2023-01-25 Thread Dana Jansens via Phabricator via cfe-commits
danakj updated this revision to Diff 492176. danakj added a comment. Improve the comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142560/new/ https://reviews.llvm.org/D142560 Files: clang/lib/AST/ASTContext.cpp

[PATCH] D142560: Allow getRawCommentForDecl to find comments in macros

2023-01-25 Thread Dana Jansens via Phabricator via cfe-commits
danakj added inline comments. Comment at: clang/test/Index/annotate-comments-objc.m:121 // CHECK: annotate-comments-objc.m:32:9: ObjCInstanceMethodDecl=method1_isdoxy4:{{.*}} method1_isdoxy4 IS_DOXYGEN_SINGLE -// CHECK: annotate-comments-objc.m:43:22:

[PATCH] D142560: Allow getRawCommentForDecl to find comments in macros

2023-01-25 Thread Dana Jansens via Phabricator via cfe-commits
danakj updated this revision to Diff 492172. danakj added a comment. Ensure the comment outside the macro is attached to enums defined inside NS_ENUM() and NS_OPTIONS() macros. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142560/new/

[PATCH] D142560: Allow getRawCommentForDecl to find comments in macros

2023-01-25 Thread Dana Jansens via Phabricator via cfe-commits
danakj added inline comments. Comment at: clang/test/Index/annotate-comments-objc.m:121 // CHECK: annotate-comments-objc.m:32:9: ObjCInstanceMethodDecl=method1_isdoxy4:{{.*}} method1_isdoxy4 IS_DOXYGEN_SINGLE -// CHECK: annotate-comments-objc.m:43:22:

[PATCH] D142560: Allow getRawCommentForDecl to find comments in macros

2023-01-25 Thread Dana Jansens via Phabricator via cfe-commits
danakj updated this revision to Diff 492141. danakj added a comment. Adding back a period that was removed from a comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142560/new/ https://reviews.llvm.org/D142560 Files:

[PATCH] D142560: Allow getRawCommentForDecl to find comments in macros

2023-01-25 Thread Dana Jansens via Phabricator via cfe-commits
danakj created this revision. Herald added a subscriber: arphaman. Herald added a project: All. danakj requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The key part of getRawCommentForDecl() required to find a comment is determining where