shafik added inline comments.

================
Comment at: clang/lib/Sema/SemaStmtAttr.cpp:319
+  };
+  // There are 7 categories of loop hints attributes: vectorize, interleave,
+  // unroll, unroll_and_jam, pipeline, distribute, and vectorize predicate.
----------------
Can you break up this comment, I think it should go above the enum and each one 
that is specific to an enumerator should go above that enumerator. 


================
Comment at: clang/lib/Sema/SemaStmtAttr.cpp:331-332
     const LoopHintAttr *NumericAttr;
-  } HintAttrs[] = {{nullptr, nullptr}, {nullptr, nullptr}, {nullptr, nullptr},
-                   {nullptr, nullptr}, {nullptr, nullptr}, {nullptr, nullptr},
-                   {nullptr, nullptr}};
+  } HintAttrs[CategoryType::NumberOfCategories];
+  memset(HintAttrs, 0, sizeof(HintAttrs));
 
----------------
You can use `{}` to initialize the array. This will value-initialize each 
element, which for pointers will set it to zero.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137570

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

Reply via email to