================
@@ -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;
+ }
+ }
----------------
TPPPP72 wrote:
Used `llvm::any_of` as requested by @zwuis.
https://github.com/llvm/llvm-project/pull/217875
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits