]> granicus.if.org Git - clang/commitdiff
Add macro test from N3781.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 26 Sep 2013 18:15:22 +0000 (18:15 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 26 Sep 2013 18:15:22 +0000 (18:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191444 91177308-0d34-0410-b5e6-96231b3b80d8

test/Lexer/cxx1y_digit_separators.cpp

index 59ad5d30f48e2e26b375c22f437c74c4fc9d25a7..39ea3e7b8d74659a59b249aba6334e24400b24d8 100644 (file)
@@ -36,3 +36,8 @@ namespace floating {
 
 #line 123'456
 static_assert(__LINE__ == 123456, "");
+
+// x has value 0 in C++11 and 34 in C++1y.
+#define M(x, ...) __VA_ARGS__
+constexpr int x = { M(1'2,3'4) };
+static_assert(x == 34, "");