We booked a room in Barcelona and when we arrived at the building we noticed a communication which says the flat was not allowed to be rent by Airbnb and report that to Airbnb.
You can report the listing to Airbnb via the "flag" textlink in the listing.
But as you booked it, you should ask the host about it first. If it is indeed not legally rented, you can contact Airbnb CS and inform them about the situation.