r288793 - Also recognize -std=iso9899:201x
Benjamin Kramer via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 6 02:23:07 PST 2016
Author: d0k
Date: Tue Dec 6 04:23:07 2016
New Revision: 288793
URL: http://llvm.org/viewvc/llvm-project?rev=288793&view=rev
Log:
Also recognize -std=iso9899:201x
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
Modified:
cfe/trunk/include/clang/Frontend/LangStandards.def
cfe/trunk/test/Preprocessor/init.c
Modified: cfe/trunk/include/clang/Frontend/LangStandards.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/LangStandards.def?rev=288793&r1=288792&r2=288793&view=diff
==============================================================================
--- cfe/trunk/include/clang/Frontend/LangStandards.def (original)
+++ cfe/trunk/include/clang/Frontend/LangStandards.def Tue Dec 6 04:23:07 2016
@@ -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",
Modified: cfe/trunk/test/Preprocessor/init.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/init.c?rev=288793&r1=288792&r2=288793&view=diff
==============================================================================
--- cfe/trunk/test/Preprocessor/init.c (original)
+++ cfe/trunk/test/Preprocessor/init.c Tue Dec 6 04:23:07 2016
@@ -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
More information about the cfe-commits
mailing list