bala-bhargav wrote:

@vgvassilev
 I've updated the PR to address all your comments — the fix is now entirely 
confined to 
Interpreter.cpp with no changes to ParseDecl.cpp or any other file.  The 
approach is i  suppresses warn_unused_result before parsing (since we don't 
know the semicolon status at that point), and after parsing, re-enables the 
warning and explicitly diagnoses [[nodiscard]] only for 
TopLevelStmtDecl
 expressions where the semicolon is present (i.e., the value is genuinely being 
discarded). A test has been added covering both scenarios. I would appreciate 
your review, and please do let me know if you'd prefer a different approach — 
I'm happy to follow in your guidance.

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

Reply via email to