This is an archive of the discontinued LLVM Phabricator instance.

[C++11] Don't put empty quotes in static_assert diagnostic.
AbandonedPublic

Authored by Rakete1111 on Oct 26 2017, 10:34 PM.

Details

Summary

This patch removes the empty "" when using static_assert(1 + 1 == 3, ""); in the diagnostic:

main.cpp:1:1: error: static_assert failed
static_assert(1 + 1 == 3, "");
^             ~~~~~~~~~~

Diff Detail

Event Timeline

Rakete1111 created this revision.Oct 26 2017, 10:34 PM
kimgr added a subscriber: kimgr.Oct 26 2017, 11:51 PM

Why? It seems easier to me to map back if the diagnostic mirrors the code as-written.

Rakete1111 abandoned this revision.Oct 27 2017, 1:24 AM

@kimgr Well, mostly because they bother me a bit, don't know what others think though. I just thought it would be nice if they didn't appear, mainly because there is no need to show empty quotes in the error message. Hmm, you have a point though... Didn't think of that. Thanks +1