[flang] [clang-tools-extra] [llvm] [clang] [compiler-rt] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 16 11:50:04 PST 2023


================
@@ -359,16 +359,34 @@ static Attr *handleCodeAlignAttr(Sema &S, Stmt *St, const ParsedAttr &A) {
 static void
 CheckForDuplicateCodeAlignAttrs(Sema &S,
                                 const SmallVectorImpl<const Attr *> &Attrs) {
-  const Attr *A = nullptr;
-  for (const auto *I : Attrs) {
-    if (isa<CodeAlignAttr>(I)) {
-      if (A) {
-        S.Diag(I->getLocation(), diag::err_loop_attr_duplication) << A;
-        S.Diag(A->getLocation(), diag::note_previous_attribute);
-      }
-      A = I;
+    const auto *FirstItr =
----------------
smanna12 wrote:

Fixed now. Thanks

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


More information about the cfe-commits mailing list