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:/
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
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
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
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
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:
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'">;
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
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
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
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
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
12 matches
Mail list logo