[PATCH] D59121: [analyzer] Fix macro names in diagnostics within bigger macros.

2019-04-23 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC359037: [analyzer] Fix macro names in diagnostics within bigger macros. (authored by dergachev, committed by ). Changed prior to commit: https://reviews.llvm.org/D59121?vs=192917=196329#toc

[PATCH] D59121: [analyzer] Fix macro names in diagnostics within bigger macros.

2019-04-10 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. This revision is now accepted and ready to land. LGTM! Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59121/new/ https://reviews.llvm.org/D59121 ___ cfe-commits mailing

[PATCH] D59121: [analyzer] Fix macro names in diagnostics within bigger macros.

2019-03-29 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso accepted this revision. Charusso added a comment. Nice catch! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59121/new/ https://reviews.llvm.org/D59121 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D59121: [analyzer] Fix macro names in diagnostics within bigger macros.

2019-03-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 192917. NoQ added a comment. Also, this is kinda weird. According to my logic, we should have written `Assuming 'i' is equal to 4294967295` because that's what the user will see in the macro popup. However, that's incorrect for the same reason: `i` is an int,

[PATCH] D59121: [analyzer] Fix macro names in diagnostics within bigger macros.

2019-03-29 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D59121#1448386 , @NoQ wrote: > Mmm, that *is* an `Assuming...` piece, i.e., this is the same code, just the > structure of macros is more complicated than usual. You told me we would like to see a value when we hover over a

[PATCH] D59121: [analyzer] Fix macro names in diagnostics within bigger macros.

2019-03-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Mmm, that *is* an `Assuming...` piece, i.e., this is the same code, just the structure of macros is more complicated than usual. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59121/new/ https://reviews.llvm.org/D59121

[PATCH] D59121: [analyzer] Fix macro names in diagnostics within bigger macros.

2019-03-29 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D59121#1448367 , @NoQ wrote: > On second thought, dunno. In the scan-build macro preview it wouldn't show > you UINT32_MAX anyway. Maybe let's keep this behavior. > > Cleaned up the patch a little bit. Somehow on the

[PATCH] D59121: [analyzer] Fix macro names in diagnostics within bigger macros.

2019-03-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 192906. NoQ added a comment. On second thought, dunno. In the scan-build macro preview it wouldn't show you UINT32_MAX anyway. Maybe let's keep this behavior. Cleaned up the patch a little bit. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59121/new/

[PATCH] D59121: [analyzer] Fix macro names in diagnostics within bigger macros.

2019-03-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. I think the right thing to do here is "look at the immediate macro; while it expands exactly to our original expression, look at what it is an expansion of; write down the last macro we've reached". My code now gives up whenever we stop expanding to the original

[PATCH] D59121: [analyzer] Fix macro names in diagnostics within bigger macros.

2019-03-28 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 192765. NoQ added a comment. An elegant solution for a more civilized age. Unfortunately, doesn't preserve the `UINT32_MAX` macro in the newly added test - i'll try a bit harder to preserve it. Relies on D59977 to work.

[PATCH] D59121: [analyzer] Fix macro names in diagnostics within bigger macros.

2019-03-08 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso requested changes to this revision. Charusso added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:1985 bool partOfParentMacro = false; +StringRef PName = ""; if (ParentEx->getBeginLoc().isMacroID()) {

[PATCH] D59121: [analyzer] Fix macro names in diagnostics within bigger macros.

2019-03-08 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus requested changes to this revision. Szelethus added a comment. This revision now requires changes to proceed. Uhh, it's such a chore to work on these things -- You can really feel that the preprocessor must've been the first thing implemented in clang. Unfortunately, you really have

[PATCH] D59121: [analyzer] Fix macro names in diagnostics within bigger macros.

2019-03-07 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a_sidorin, rnkovacs, mikhail.ramalho, Szelethus, baloghadamsoftware, Charusso. Herald added subscribers: cfe-commits, jdoerfert, dkrupp, donat.nagy, a.sidorin, szepet. Herald added a project: clang. On the newly included test