AaronBallman wrote: > @AaronBallman I chose to add it to the existing group because if an #include > both uses the wrong case and has backslashes, we'd emit two fixits for the > same source span (and I assume that would misbehave).
I think we already have this situation today and we tend to allow it: https://godbolt.org/z/x65cW69fG IIRC we handle it by applying the first fix and not the others when trying to apply "all" fixes, but I could be wrong on that. > I agree it would be nice to be able to turn it off separately though. I saw > that suppressing warnings based on flags is usually handled implicitly inside > DiagnosticBuilder which scared me away from e.g. manually checking whether > path separator warnings are enabled and then modifying the case insensitivity > warning so that only one fixit is emitted for both changes. > > Is there a clean way to separate them to be behind different flags? I don't know of facilities to make that easier. If there are conflicting fix-its (e.g., you could insert a cast as a fix, or you could change the declared type as a fix, and we don't know which is correct) then we'd apply them via a note rather than via the warning or error. But that's a different situation than here where a user may care about backslashes but not care about case sensitivity, etc. https://github.com/llvm/llvm-project/pull/186770 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
