[clang] [clang] Fix `gnu::init_priority` attribute handling for reserved values (PR #121577)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 16 08:56:13 PST 2025


================
@@ -3591,15 +3591,20 @@ static void handleInitPriorityAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
     return;
   }
 
+  if (prioritynum < 0 || prioritynum > 65535) {
----------------
erichkeane wrote:

checking `<0` is  silly, it is an unsigned argument.

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


More information about the cfe-commits mailing list