[PATCH] D27545: Don't assert when redefining a built-in macro in a PCH, PR29119

Nico Weber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 7 16:25:25 PST 2016


thakis added a comment.

Thanks!



================
Comment at: test/PCH/builtin-macro.c:29
+
+const char s[] = __DATE__ " " __TIME__ " " __TIMESTAMP__;
+
----------------
rnk wrote:
> This test doesn't seem to fail if `__DATE__` expands to something. I removed `-D__DATE__=` from the command line and it passes. Can we find a way to make it fail? `int x = __DATE__ 42;`?
Oh, you mean to check that the __DATE__ value from -D is used, instead of the value of the builtin? Your suggestion works, good idea.


https://reviews.llvm.org/D27545





More information about the cfe-commits mailing list