Re: [PATCH] D11778: Improvements on Diagnostic in Macro Expansions

2015-08-12 Thread Richard Trieu via cfe-commits
rtrieu accepted this revision. rtrieu added a comment. This revision is now accepted and ready to land. This is a first step towards making macro diagnostics better. http://reviews.llvm.org/D11778 ___ cfe-commits mailing list

Re: [PATCH] D11778: Improvements on Diagnostic in Macro Expansions

2015-08-12 Thread Richard Trieu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL244788: Stop printing macro backtraces that don't help diagnostics. (authored by rtrieu). Changed prior to commit: http://reviews.llvm.org/D11778?vs=31425id=31965#toc Repository: rL LLVM

Re: [PATCH] D11778: Improvements on Diagnostic in Macro Expansions

2015-08-10 Thread Zhengkai Wu via cfe-commits
zhengkai added a comment. The helper function checkRangesForMacroArgExpansion is to check if the current Loc and Ranges are expansions of a macro's arguments. If so, the IgnoredEnd will record this position and thus omitting all later expanded macros (Later expanded macros are showed on top of

Re: [PATCH] D11778: Improvements on Diagnostic in Macro Expansions

2015-08-10 Thread Zhengkai Wu via cfe-commits
zhengkai added a comment. The example our method doesn't work: https://llvm.org/bugs/show_bug.cgi?id=24424 http://reviews.llvm.org/D11778 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D11778: Improvements on Diagnostic in Macro Expansions

2015-08-10 Thread Richard Trieu via cfe-commits
rtrieu added a comment. There are still a lot of other cases in which my method still works as the old version did. And I think there are several bugs in the existing functions like emitDiagnostic and mapDiagnosticRanges. This is issued as a bug, the link is