================
@@ -2214,6 +2214,22 @@ Parser::DeclGroupPtrTy 
Parser::ParseOpenMPDeclarativeDirectiveWithExtDecl(
           << (DKind == OMPD_declare_simd ? 0 : 1);
       return DeclGroupPtrTy();
     }
+
+    DeclGroupRef DG = Ptr.get();
+    bool HasNewDecl = false;
+    SourceManager &SM = PP.getSourceManager();
+    for (const Decl *D : DG) {
+      if (SM.isBeforeInTranslationUnit(Loc, D->getBeginLoc())) {
+        HasNewDecl = true;
+        break;
+      }
+    }
----------------
alexey-bataev wrote:

Make it a lambda

https://github.com/llvm/llvm-project/pull/217875
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to