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=31425&id=31965#toc Repository: rL LLVM http://rev

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 cfe-commits@lists.llvm.

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 http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

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 > https://llvm.or

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 t

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

2015-08-05 Thread Richard Trieu
rtrieu added a comment. Some questions about your tests. Comment at: test/Misc/reduced-diags-macros-backtrace.cpp:27 @@ +26,3 @@ +// ALL-NEXT: {{.*}}:7:23: note: expanded from macro 'LEVEL4' +// ALL-NEXT: #define LEVEL4(x) ADD(p,x) +// ALL-NEXT: ^ -