]> granicus.if.org Git - clang/commitdiff
Also recognize -std=iso9899:201x
authorBenjamin Kramer <benny.kra@googlemail.com>
Tue, 6 Dec 2016 10:23:07 +0000 (10:23 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Tue, 6 Dec 2016 10:23:07 +0000 (10:23 +0000)
It should already be handled but a typo in the LANGSTANDARD() definition
was introduced in r147220.

Patch by Alexander Richardson, test case by me.

Differential Revision:https://reviews.llvm.org/D27427

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288793 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Frontend/LangStandards.def
test/Preprocessor/init.c

index a3036932f049e6d64a3534b480d8152086bd2a3e..06fe1a3350cee23924fa0288f36b3c9180d27658 100644 (file)
@@ -81,7 +81,7 @@ LANGSTANDARD(iso9899_2011,
              "iso9899:2011", "ISO C 2011",
              LineComment | C99 | C11 | Digraphs | HexFloat)
 LANGSTANDARD(iso9899_201x,
-             "iso9899:2011", "ISO C 2011",
+             "iso9899:201x", "ISO C 2011",
              LineComment | C99 | C11 | Digraphs | HexFloat)
 
 LANGSTANDARD(gnu11, "gnu11",
index d5d83da0fb350dc9d4f6dc447e7abccc7769a6fc..b003404df6ff061736efd030a99bc3ff7158d94d 100644 (file)
@@ -64,6 +64,9 @@
 //
 // 
 // RUN: %clang_cc1 -std=c11 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix C11 %s
+// RUN: %clang_cc1 -std=c1x -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix C11 %s
+// RUN: %clang_cc1 -std=iso9899:2011 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix C11 %s
+// RUN: %clang_cc1 -std=iso9899:201x -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix C11 %s
 //
 // C11:#define __STDC_UTF_16__ 1
 // C11:#define __STDC_UTF_32__ 1