summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-02-25 04:01:39 +0000
committerChris Lattner <sabre@nondot.org>2008-02-25 04:01:39 +0000
commitcb0d62c70d33324cc8e1c90d844165d5196094d8 (patch)
tree9d72ebc0c87952dc1ff15348cbca0e6eb5206ac0
parent01d6257e818f71025bc8da9dcbba6925047868dc (diff)
downloadbcm5719-llvm-cb0d62c70d33324cc8e1c90d844165d5196094d8.tar.gz
bcm5719-llvm-cb0d62c70d33324cc8e1c90d844165d5196094d8.zip
enable digraphs for C94, thanks to Neil for pointing this out.
llvm-svn: 47543
-rw-r--r--clang/Driver/clang.cpp3
-rw-r--r--clang/include/clang/Basic/LangOptions.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/clang/Driver/clang.cpp b/clang/Driver/clang.cpp
index 89e0bad4d0f..fa0c9fc43fc 100644
--- a/clang/Driver/clang.cpp
+++ b/clang/Driver/clang.cpp
@@ -369,7 +369,6 @@ static void InitializeLanguageStandard(LangOptions &Options, LangKind LK) {
// FALL THROUGH.
case lang_gnu99:
case lang_c99:
- Options.Digraphs = 1;
Options.C99 = 1;
Options.HexFloats = 1;
// FALL THROUGH.
@@ -377,6 +376,8 @@ static void InitializeLanguageStandard(LangOptions &Options, LangKind LK) {
Options.BCPLComment = 1; // Only for C99/C++.
// FALL THROUGH.
case lang_c94:
+ Options.Digraphs = 1; // C94, C99, C++.
+ // FALL THROUGH.
case lang_c89:
break;
}
diff --git a/clang/include/clang/Basic/LangOptions.h b/clang/include/clang/Basic/LangOptions.h
index 1c4dac315e8..bee0b51ab2f 100644
--- a/clang/include/clang/Basic/LangOptions.h
+++ b/clang/include/clang/Basic/LangOptions.h
@@ -24,7 +24,7 @@ struct LangOptions {
unsigned Trigraphs : 1; // Trigraphs in source files.
unsigned BCPLComment : 1; // BCPL-style // comments.
unsigned DollarIdents : 1; // '$' allowed in identifiers.
- unsigned Digraphs : 1; // C++ and C99
+ unsigned Digraphs : 1; // C94, C99 and C++
unsigned HexFloats : 1; // C99 Hexadecimal float constants.
unsigned C99 : 1; // C99 Support
unsigned Microsoft : 1; // Microsoft extensions.
OpenPOWER on IntegriCloud