hnrklssn wrote:

@ChuanqiXu9 After investigating the test failures for my previous fix I 
realised I'd misunderstood `EvaluatedStmt`. That fix caused test failures 
because it essentially ignored `EvaluatedStmt` initializers if they didn't 
originate in a deserialized AST and were known to have side effects. If the 
defining module had an `EvaluatedStmt` initializer it would say it didn't have 
side effects since there would be no `ASTReader` claiming to know about side 
effects for that `VarDecl`. I rewrote the approach completely to cache the 
result of `VarDecl::hasInitWithSideEffects` in `EvaluatedStmt`. Since all 
deserialized `VarDecl` initializers are `EvaluatedStmt` that works great.

https://github.com/llvm/llvm-project/pull/146468
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to