Lavrentieff proved a Theorem which implies that every real valued continuous function defined on a dense subset $D\subseteq \mathbb R$ admits a continuous extension to some $G\_\delta $ subset of $\mathbb R$. See Theorem (4.3.20) in "General Topology" by Engelking, or this [Mathematics Stack Exchange post](https://math.stackexchange.com/questions/127374/extending-a-continuous-function-defined-on-the-rationals).


If the dense subset $D$ is already a $G\_\delta $, such as the set of irrational numbers, Lavrentieff's Theorem of course says nothing. So let us be a bit more audacious:



> 
> Given a real valued continuous function $f$ defined on $\mathbb R\setminus \mathbb Q$, is there an *open* subset $U$ of $\mathbb R$, containing all irrational numbers, and a continuous extension of $f$ to U?
> 
> 
> 



Extending continuous functioms defined on the irrationals
Enumerate the rationals as $\{q\_n\}$ and define $f(x) = \sum\_{n : q\_n < x} 2^{-n}$. Then $f$ is continuous on $\mathbb{R} \setminus \mathbb{Q}$ but cannot be extended continuously to any proper superset of $\mathbb{R} \setminus \mathbb{Q}$.


