aaron.ballman added a reviewer: erichkeane.
aaron.ballman added a comment.

Thanks for working on this fix! A few things:

- Please add a summary description to the patch, and be sure to include a 
reference to the github issue in the summary.
- All functional changes (e.g., not typo fixes, fixes to comments, or other NFC 
changes) need test coverage that demonstrates the issue has been resolved.
- All functional changes should have a release note in 
`clang/docs/ReleaseNotes.rst`



================
Comment at: clang/lib/Sema/SemaDeclAttr.cpp:3764-3767
   if (!checkFunctionOrMethodParameterIndex(S, D, AL, 1, IdxExpr, Idx))
     return;
-
+  if (Idx.getASTIndex() >= getFunctionOrMethodNumParams(D))
+    return;
----------------
Did you look into fixing this within `checkFunctionOrMethodParameterIndex()` 
instead? That way, all callers of the API get the correct behavior instead of 
having to find individual attributes to check the logic (I believe there are 
other attributes with the same underlying problem).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147037/new/

https://reviews.llvm.org/D147037

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to