I've read in various places (such as here) that you can't safely feed an input voltage to an op-amp / comparator that's above its supply voltage, even when within maximum ratings.
However, the datasheet for the MIC6270 states a 2-36V supply, and also states (general note 6, page 2):
Positive excursions of input voltage may exceed the power supply level. As long as the other voltage remains within the common-mode range, the comparator will provide a proper output state.
This seems pretty clear, but I'd like to double check – am I correct in thinking that this means the input voltage can above the supply voltage?
(Aside: my potential use case here is a signal that will be fed into the comparator of around 18V on one input and ground on the other. Supply will be 3V and the comparator output fed directly to a microcontroller pin. I was going to put a voltage divider on the signals going into the comparator, but if I don't need to do that then great.)
In addition to note 6, note 4 of the "Electrical characteristics" shown in the datasheet also explicitly states: Therefore, if the inputs are within 36V, there won't be damage, but the common mode range must be within V+-1.5V, otherwise the part might not work correctly. In your case, if I understood correctly, you want to power it with 3V, and put one input to 18V. Regardless the other input, the common-mode voltage will be larger or equal to 9V, therefore it will exceed 3V - 1.5V = 1.5V. Therefore your solution might not work. Use a resistor divider if possible, to bring the VCM within the specified range.
EDIT: (following what @berry120 got from Microchip as an answer).
Despite note 4, Microchip answered that it's enough that at least one of the two inputs is within the common mode voltage range.
In fact, here's what Microchip replied:
Still, if your signal goes from 0V to 18V, then comparing that signal (or better, its divided version) with 0 will lead to unpredictable results due to offsets. To check if 18V is above a certain value, compare it to a value larger than 0 (e.g. 0.5V or so), so that, when the input voltage goes to 0, the comparator will compare 0.5 to 0, and not 0 to 0 (plus offsets).
By the way, is not so uncommon that in some IC you can feed a voltage higher than the supply: think about a 5-V tolerant IC, powered at 3.3V.
In addition, on some ICs, you can also safely tie an open drain/collector output above Vcc/Vdd. For instance the output of comparator LM311 can be tied up to 40V (abs maximum rating), even if you power it at 5V.