This Washington Post article was written after the Paris attacks of fall 2015. It says that after a terrorist attack these things happen:
-
concerns about terrorism increase suspicion and even intolerance directed at migrants, refugees and Muslims.
-
On average, leaders who are Republican, male, and have relevant national security experience tend to be viewed as more competent.
-
terrorist threat advantages Republicans more than Democrats, in part because Republicans are traditionally perceived as better able to handle issues related to national defense.
-
Leaders who are both female and Democratic may…experience the most negative political consequences of terrorist attacks.
-
Hillary Clinton is likely to be bolstered by the foreign policy experience she gained as secretary of state and by her tendency to take stands that are more hawkish than those of Bernie Sanders.
-
Trump is a bit of a wild card, however. His bold style may be appealing in a context of threat. However, he may be hurt by his lack of any significant foreign policy experience
In other words, nobody knows. The general election is going to be interesting, and if god forbid there were to be major terrorist or geopolitical events it will be even more interesting.