[PATCH] D28832: Improve redefinition errors pointing to the same header.

2017-05-10 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL302765: [Sema] Improve redefinition errors pointing to the same header (authored by bruno). Changed prior to commit: https://reviews.llvm.org/D28832?vs=95369&id=98584#toc Repository: rL LLVM https:/

[PATCH] D28832: Improve redefinition errors pointing to the same header.

2017-04-24 Thread Richard Smith via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM. I'd like to make sure we try to use something better than the first import location for a module (that location is especially meaningless under `-fmodules-local-submodule-visibility`), b

[PATCH] D28832: Improve redefinition errors pointing to the same header.

2017-04-24 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Ping https://reviews.llvm.org/D28832 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28832: Improve redefinition errors pointing to the same header.

2017-04-16 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. @bruno, ok, sounds good. https://reviews.llvm.org/D28832 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28832: Improve redefinition errors pointing to the same header.

2017-04-14 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. @v.g.vassilev your testcase is interesting but it's unrelated to this specific improvement. The error message it's triggered by (a) the decl name not being found because `kROOTD_OPEN` is hidden, (b) type transforms looks for an alternative (c) `Sema::diagnoseMissingImport

[PATCH] D28832: Improve redefinition errors pointing to the same header.

2017-04-14 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno updated this revision to Diff 95369. bruno marked 2 inline comments as done. bruno added a comment. Updated the patch after Richard's comments: Before -- In file included from x.c:2: Inputs4/C.h:3:5: error: redefinition of 'c' int c = 1; ^ In module 'X' imported from x.c:

[PATCH] D28832: Improve redefinition errors pointing to the same header.

2017-04-14 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno marked 5 inline comments as done. bruno added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:8708 +def note_redefinition_modules_same_file : Note< + "'%0' included multiple times, additional (likely non-modular) include site in module '%1'">;

[PATCH] D28832: Improve redefinition errors pointing to the same header.

2017-04-12 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. Here is an example that we recently had where we would be very happy to see better diagnostics: MessageTypes.h: #ifndef ROOT_MessageTypes #define ROOT_MessageTypes enum EMessageTypes { kROOTD_OPEN = 2004, //filename follows + mod

[PATCH] D28832: Improve redefinition errors pointing to the same header.

2017-01-24 Thread Richard Smith via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:8708 +def note_redefinition_modules_same_file : Note< + "'%0' included multiple times, additional (likely non-modular) include site in module '%1'">; +def note_redefinition_modules_same_fi

[PATCH] D28832: Improve redefinition errors pointing to the same header.

2017-01-20 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Thanks Vassil. @rsmith is this ok for you? https://reviews.llvm.org/D28832 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28832: Improve redefinition errors pointing to the same header.

2017-01-18 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. This looks good to me. https://reviews.llvm.org/D28832 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28832: Improve redefinition errors pointing to the same header.

2017-01-17 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno created this revision. Diagnostics related to redefinition errors that point to the same header file do not provide much information that helps fixing the issue. In modules context it usually happens because of a non modular include, in non-module context it might happen because of the la