================
@@ -26,6 +29,17 @@ bool isOverrideMethod(const FunctionDecl *Function) {
return MD->size_overridden_methods() > 0 || MD->hasAttr<OverrideAttr>();
return false;
}
+
+bool hasAttrAfterParam(const SourceManager *SourceManager,
+ const ParmVarDecl *Param) {
+ for (const auto *Attr : Param->attrs()) {
+ if (SourceManager->isBeforeInTranslationUnit(Param->getLocation(),
+ Attr->getLocation())) {
+ return true;
+ }
+ }
+ return false;
+}
----------------
usx95 wrote:
The behaviour seems correct then. Please add this test case in the tests.
`isBeforeInTranslationUnit` seems to be the correct function here.
https://github.com/llvm/llvm-project/pull/122286
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits