rsmith accepted this revision. rsmith marked 2 inline comments as done. rsmith added inline comments. This revision is now accepted and ready to land.
================ Comment at: clang/lib/Sema/SemaDeclCXX.cpp:98 + // + if (DRE->isNonOdrUse() != NOUR_Unevaluated) + return S.Diag(DRE->getBeginLoc(), ---------------- I think this is an oversight, and we should probably allow all non-odr-use mentions here. I'll take this to the committee to check. But let's go with the rule as written for now. ================ Comment at: clang/lib/Sema/SemaDeclCXX.cpp:114 + // + if (VDecl->isLocalVarDecl() && !DRE->isNonOdrUse()) return S.Diag(DRE->getBeginLoc(), ---------------- Do we perform this check after finishing the full-expression and properly setting the 'non-odr-use' bits? Oh, I see, that's what the follow-up change is about :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81615/new/ https://reviews.llvm.org/D81615 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits