[clang] [Clang][Parser] Remove the concept from the DeclContext if the definition is invalid (PR #111179)

Younan Zhang via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 4 10:39:38 PDT 2024


================
@@ -337,6 +343,8 @@ Parser::ParseConceptDefinition(const ParsedTemplateInfo &TemplateInfo,
   ExprResult ConstraintExprResult =
       Actions.CorrectDelayedTyposInExpr(ParseConstraintExpression());
   if (ConstraintExprResult.isInvalid()) {
+    if (AddedToScope)
----------------
zyn0217 wrote:

Oh NVM, I see your point:
`PushOnScopeChains()` is hinged on `Previous.empty()`, so I'm afraid we need the flag, otherwise we can definitely do away with the flag

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


More information about the cfe-commits mailing list