Loading clang/include/clang/Basic/DiagnosticLexKinds.td +2 −2 Original line number Diff line number Diff line Loading @@ -41,9 +41,9 @@ def trigraph_ends_block_comment : Warning<"trigraph ends block comment">, def trigraph_converted : Warning<"trigraph converted to '%0' character">, InGroup<Trigraphs>; def ext_multi_line_bcpl_comment : Extension<"multi-line // comment">, def ext_multi_line_line_comment : Extension<"multi-line // comment">, InGroup<Comment>; def ext_bcpl_comment : Extension< def ext_line_comment : Extension< "// comments are not allowed in this language">, InGroup<Comment>; def ext_no_newline_eof : Extension<"no newline at end of file">, Loading clang/include/clang/Basic/LangOptions.def +1 −1 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ BENIGN_LANGOPT(ObjCDefaultSynthProperties , 1, 0, BENIGN_LANGOPT(ObjCInferRelatedResultType , 1, 1, "Objective-C related result type inference") LANGOPT(Trigraphs , 1, 0,"trigraphs") LANGOPT(BCPLComment , 1, 0, "BCPL-style '//' comments") LANGOPT(LineComment , 1, 0, "'//' comments") LANGOPT(Bool , 1, 0, "bool, true, and false keywords") LANGOPT(WChar , 1, CPlusPlus, "wchar_t keyword") BENIGN_LANGOPT(DollarIdents , 1, 1, "'$' in identifiers") Loading clang/include/clang/Frontend/LangStandard.h +3 −3 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ namespace clang { namespace frontend { enum LangFeatures { BCPLComment = (1 << 0), LineComment = (1 << 0), C89 = (1 << 1), C99 = (1 << 2), C11 = (1 << 3), Loading Loading @@ -54,8 +54,8 @@ public: /// getDescription - Get the description of this standard. const char *getDescription() const { return Description; } /// hasBCPLComments - Language supports '//' comments. bool hasBCPLComments() const { return Flags & frontend::BCPLComment; } /// Language supports '//' comments. bool hasLineComments() const { return Flags & frontend::LineComment; } /// isC89 - Language is a superset of C89. bool isC89() const { return Flags & frontend::C89; } Loading clang/include/clang/Frontend/LangStandards.def +27 −27 Original line number Diff line number Diff line Loading @@ -36,99 +36,99 @@ LANGSTANDARD(c94, "iso9899:199409", LANGSTANDARD(gnu89, "gnu89", "ISO C 1990 with GNU extensions", BCPLComment | C89 | Digraphs | GNUMode | ImplicitInt) LineComment | C89 | Digraphs | GNUMode | ImplicitInt) LANGSTANDARD(gnu90, "gnu90", "ISO C 1990 with GNU extensions", BCPLComment | C89 | Digraphs | GNUMode | ImplicitInt) LineComment | C89 | Digraphs | GNUMode | ImplicitInt) // C99-ish modes LANGSTANDARD(c99, "c99", "ISO C 1999", BCPLComment | C99 | Digraphs | HexFloat) LineComment | C99 | Digraphs | HexFloat) LANGSTANDARD(c9x, "c9x", "ISO C 1999", BCPLComment | C99 | Digraphs | HexFloat) LineComment | C99 | Digraphs | HexFloat) LANGSTANDARD(iso9899_1999, "iso9899:1999", "ISO C 1999", BCPLComment | C99 | Digraphs | HexFloat) LineComment | C99 | Digraphs | HexFloat) LANGSTANDARD(iso9899_199x, "iso9899:199x", "ISO C 1999", BCPLComment | C99 | Digraphs | HexFloat) LineComment | C99 | Digraphs | HexFloat) LANGSTANDARD(gnu99, "gnu99", "ISO C 1999 with GNU extensions", BCPLComment | C99 | Digraphs | GNUMode | HexFloat) LineComment | C99 | Digraphs | GNUMode | HexFloat) LANGSTANDARD(gnu9x, "gnu9x", "ISO C 1999 with GNU extensions", BCPLComment | C99 | Digraphs | GNUMode | HexFloat) LineComment | C99 | Digraphs | GNUMode | HexFloat) // C11 modes LANGSTANDARD(c11, "c11", "ISO C 2011", BCPLComment | C99 | C11 | Digraphs | HexFloat) LineComment | C99 | C11 | Digraphs | HexFloat) LANGSTANDARD(c1x, "c1x", "ISO C 2011", BCPLComment | C99 | C11 | Digraphs | HexFloat) LineComment | C99 | C11 | Digraphs | HexFloat) LANGSTANDARD(iso9899_2011, "iso9899:2011", "ISO C 2011", BCPLComment | C99 | C11 | Digraphs | HexFloat) LineComment | C99 | C11 | Digraphs | HexFloat) LANGSTANDARD(iso9899_201x, "iso9899:2011", "ISO C 2011", BCPLComment | C99 | C11 | Digraphs | HexFloat) LineComment | C99 | C11 | Digraphs | HexFloat) LANGSTANDARD(gnu11, "gnu11", "ISO C 2011 with GNU extensions", BCPLComment | C99 | C11 | Digraphs | GNUMode | HexFloat) LineComment | C99 | C11 | Digraphs | GNUMode | HexFloat) LANGSTANDARD(gnu1x, "gnu1x", "ISO C 2011 with GNU extensions", BCPLComment | C99 | C11 | Digraphs | GNUMode | HexFloat) LineComment | C99 | C11 | Digraphs | GNUMode | HexFloat) // C++ modes LANGSTANDARD(cxx98, "c++98", "ISO C++ 1998 with amendments", BCPLComment | CPlusPlus | Digraphs) LineComment | CPlusPlus | Digraphs) LANGSTANDARD(cxx03, "c++03", "ISO C++ 1998 with amendments", BCPLComment | CPlusPlus | Digraphs) LineComment | CPlusPlus | Digraphs) LANGSTANDARD(gnucxx98, "gnu++98", "ISO C++ 1998 with amendments and GNU extensions", BCPLComment | CPlusPlus | Digraphs | GNUMode) LineComment | CPlusPlus | Digraphs | GNUMode) LANGSTANDARD(cxx0x, "c++0x", "ISO C++ 2011 with amendments", BCPLComment | CPlusPlus | CPlusPlus0x | Digraphs) LineComment | CPlusPlus | CPlusPlus0x | Digraphs) LANGSTANDARD(cxx11, "c++11", "ISO C++ 2011 with amendments", BCPLComment | CPlusPlus | CPlusPlus0x | Digraphs) LineComment | CPlusPlus | CPlusPlus0x | Digraphs) LANGSTANDARD(gnucxx0x, "gnu++0x", "ISO C++ 2011 with amendments and GNU extensions", BCPLComment | CPlusPlus | CPlusPlus0x | Digraphs | GNUMode) LineComment | CPlusPlus | CPlusPlus0x | Digraphs | GNUMode) LANGSTANDARD(gnucxx11, "gnu++11", "ISO C++ 2011 with amendments and GNU extensions", BCPLComment | CPlusPlus | CPlusPlus0x | Digraphs | GNUMode) LineComment | CPlusPlus | CPlusPlus0x | Digraphs | GNUMode) LANGSTANDARD(cxx1y, "c++1y", "Working draft for ISO C++ 2014", BCPLComment | CPlusPlus | CPlusPlus0x | CPlusPlus1y | Digraphs) LineComment | CPlusPlus | CPlusPlus0x | CPlusPlus1y | Digraphs) LANGSTANDARD(gnucxx1y, "gnu++1y", "Working draft for ISO C++ 2014 with GNU extensions", BCPLComment | CPlusPlus | CPlusPlus0x | CPlusPlus1y | Digraphs | LineComment | CPlusPlus | CPlusPlus0x | CPlusPlus1y | Digraphs | GNUMode) // OpenCL LANGSTANDARD(opencl, "cl", "OpenCL 1.0", BCPLComment | C99 | Digraphs | HexFloat) LineComment | C99 | Digraphs | HexFloat) LANGSTANDARD(opencl11, "CL1.1", "OpenCL 1.1", BCPLComment | C99 | Digraphs | HexFloat) LineComment | C99 | Digraphs | HexFloat) LANGSTANDARD(opencl12, "CL1.2", "OpenCL 1.2", BCPLComment | C99 | Digraphs | HexFloat) LineComment | C99 | Digraphs | HexFloat) // CUDA LANGSTANDARD(cuda, "cuda", "NVIDIA CUDA(tm)", BCPLComment | CPlusPlus | Digraphs) LineComment | CPlusPlus | Digraphs) #undef LANGSTANDARD clang/include/clang/Lex/Lexer.h +2 −2 Original line number Diff line number Diff line Loading @@ -562,9 +562,9 @@ private: bool LexEndOfFile (Token &Result, const char *CurPtr); bool SkipWhitespace (Token &Result, const char *CurPtr); bool SkipBCPLComment (Token &Result, const char *CurPtr); bool SkipLineComment (Token &Result, const char *CurPtr); bool SkipBlockComment (Token &Result, const char *CurPtr); bool SaveBCPLComment (Token &Result, const char *CurPtr); bool SaveLineComment (Token &Result, const char *CurPtr); bool IsStartOfConflictMarker(const char *CurPtr); bool HandleEndOfConflictMarker(const char *CurPtr); Loading Loading
clang/include/clang/Basic/DiagnosticLexKinds.td +2 −2 Original line number Diff line number Diff line Loading @@ -41,9 +41,9 @@ def trigraph_ends_block_comment : Warning<"trigraph ends block comment">, def trigraph_converted : Warning<"trigraph converted to '%0' character">, InGroup<Trigraphs>; def ext_multi_line_bcpl_comment : Extension<"multi-line // comment">, def ext_multi_line_line_comment : Extension<"multi-line // comment">, InGroup<Comment>; def ext_bcpl_comment : Extension< def ext_line_comment : Extension< "// comments are not allowed in this language">, InGroup<Comment>; def ext_no_newline_eof : Extension<"no newline at end of file">, Loading
clang/include/clang/Basic/LangOptions.def +1 −1 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ BENIGN_LANGOPT(ObjCDefaultSynthProperties , 1, 0, BENIGN_LANGOPT(ObjCInferRelatedResultType , 1, 1, "Objective-C related result type inference") LANGOPT(Trigraphs , 1, 0,"trigraphs") LANGOPT(BCPLComment , 1, 0, "BCPL-style '//' comments") LANGOPT(LineComment , 1, 0, "'//' comments") LANGOPT(Bool , 1, 0, "bool, true, and false keywords") LANGOPT(WChar , 1, CPlusPlus, "wchar_t keyword") BENIGN_LANGOPT(DollarIdents , 1, 1, "'$' in identifiers") Loading
clang/include/clang/Frontend/LangStandard.h +3 −3 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ namespace clang { namespace frontend { enum LangFeatures { BCPLComment = (1 << 0), LineComment = (1 << 0), C89 = (1 << 1), C99 = (1 << 2), C11 = (1 << 3), Loading Loading @@ -54,8 +54,8 @@ public: /// getDescription - Get the description of this standard. const char *getDescription() const { return Description; } /// hasBCPLComments - Language supports '//' comments. bool hasBCPLComments() const { return Flags & frontend::BCPLComment; } /// Language supports '//' comments. bool hasLineComments() const { return Flags & frontend::LineComment; } /// isC89 - Language is a superset of C89. bool isC89() const { return Flags & frontend::C89; } Loading
clang/include/clang/Frontend/LangStandards.def +27 −27 Original line number Diff line number Diff line Loading @@ -36,99 +36,99 @@ LANGSTANDARD(c94, "iso9899:199409", LANGSTANDARD(gnu89, "gnu89", "ISO C 1990 with GNU extensions", BCPLComment | C89 | Digraphs | GNUMode | ImplicitInt) LineComment | C89 | Digraphs | GNUMode | ImplicitInt) LANGSTANDARD(gnu90, "gnu90", "ISO C 1990 with GNU extensions", BCPLComment | C89 | Digraphs | GNUMode | ImplicitInt) LineComment | C89 | Digraphs | GNUMode | ImplicitInt) // C99-ish modes LANGSTANDARD(c99, "c99", "ISO C 1999", BCPLComment | C99 | Digraphs | HexFloat) LineComment | C99 | Digraphs | HexFloat) LANGSTANDARD(c9x, "c9x", "ISO C 1999", BCPLComment | C99 | Digraphs | HexFloat) LineComment | C99 | Digraphs | HexFloat) LANGSTANDARD(iso9899_1999, "iso9899:1999", "ISO C 1999", BCPLComment | C99 | Digraphs | HexFloat) LineComment | C99 | Digraphs | HexFloat) LANGSTANDARD(iso9899_199x, "iso9899:199x", "ISO C 1999", BCPLComment | C99 | Digraphs | HexFloat) LineComment | C99 | Digraphs | HexFloat) LANGSTANDARD(gnu99, "gnu99", "ISO C 1999 with GNU extensions", BCPLComment | C99 | Digraphs | GNUMode | HexFloat) LineComment | C99 | Digraphs | GNUMode | HexFloat) LANGSTANDARD(gnu9x, "gnu9x", "ISO C 1999 with GNU extensions", BCPLComment | C99 | Digraphs | GNUMode | HexFloat) LineComment | C99 | Digraphs | GNUMode | HexFloat) // C11 modes LANGSTANDARD(c11, "c11", "ISO C 2011", BCPLComment | C99 | C11 | Digraphs | HexFloat) LineComment | C99 | C11 | Digraphs | HexFloat) LANGSTANDARD(c1x, "c1x", "ISO C 2011", BCPLComment | C99 | C11 | Digraphs | HexFloat) LineComment | C99 | C11 | Digraphs | HexFloat) LANGSTANDARD(iso9899_2011, "iso9899:2011", "ISO C 2011", BCPLComment | C99 | C11 | Digraphs | HexFloat) LineComment | C99 | C11 | Digraphs | HexFloat) LANGSTANDARD(iso9899_201x, "iso9899:2011", "ISO C 2011", BCPLComment | C99 | C11 | Digraphs | HexFloat) LineComment | C99 | C11 | Digraphs | HexFloat) LANGSTANDARD(gnu11, "gnu11", "ISO C 2011 with GNU extensions", BCPLComment | C99 | C11 | Digraphs | GNUMode | HexFloat) LineComment | C99 | C11 | Digraphs | GNUMode | HexFloat) LANGSTANDARD(gnu1x, "gnu1x", "ISO C 2011 with GNU extensions", BCPLComment | C99 | C11 | Digraphs | GNUMode | HexFloat) LineComment | C99 | C11 | Digraphs | GNUMode | HexFloat) // C++ modes LANGSTANDARD(cxx98, "c++98", "ISO C++ 1998 with amendments", BCPLComment | CPlusPlus | Digraphs) LineComment | CPlusPlus | Digraphs) LANGSTANDARD(cxx03, "c++03", "ISO C++ 1998 with amendments", BCPLComment | CPlusPlus | Digraphs) LineComment | CPlusPlus | Digraphs) LANGSTANDARD(gnucxx98, "gnu++98", "ISO C++ 1998 with amendments and GNU extensions", BCPLComment | CPlusPlus | Digraphs | GNUMode) LineComment | CPlusPlus | Digraphs | GNUMode) LANGSTANDARD(cxx0x, "c++0x", "ISO C++ 2011 with amendments", BCPLComment | CPlusPlus | CPlusPlus0x | Digraphs) LineComment | CPlusPlus | CPlusPlus0x | Digraphs) LANGSTANDARD(cxx11, "c++11", "ISO C++ 2011 with amendments", BCPLComment | CPlusPlus | CPlusPlus0x | Digraphs) LineComment | CPlusPlus | CPlusPlus0x | Digraphs) LANGSTANDARD(gnucxx0x, "gnu++0x", "ISO C++ 2011 with amendments and GNU extensions", BCPLComment | CPlusPlus | CPlusPlus0x | Digraphs | GNUMode) LineComment | CPlusPlus | CPlusPlus0x | Digraphs | GNUMode) LANGSTANDARD(gnucxx11, "gnu++11", "ISO C++ 2011 with amendments and GNU extensions", BCPLComment | CPlusPlus | CPlusPlus0x | Digraphs | GNUMode) LineComment | CPlusPlus | CPlusPlus0x | Digraphs | GNUMode) LANGSTANDARD(cxx1y, "c++1y", "Working draft for ISO C++ 2014", BCPLComment | CPlusPlus | CPlusPlus0x | CPlusPlus1y | Digraphs) LineComment | CPlusPlus | CPlusPlus0x | CPlusPlus1y | Digraphs) LANGSTANDARD(gnucxx1y, "gnu++1y", "Working draft for ISO C++ 2014 with GNU extensions", BCPLComment | CPlusPlus | CPlusPlus0x | CPlusPlus1y | Digraphs | LineComment | CPlusPlus | CPlusPlus0x | CPlusPlus1y | Digraphs | GNUMode) // OpenCL LANGSTANDARD(opencl, "cl", "OpenCL 1.0", BCPLComment | C99 | Digraphs | HexFloat) LineComment | C99 | Digraphs | HexFloat) LANGSTANDARD(opencl11, "CL1.1", "OpenCL 1.1", BCPLComment | C99 | Digraphs | HexFloat) LineComment | C99 | Digraphs | HexFloat) LANGSTANDARD(opencl12, "CL1.2", "OpenCL 1.2", BCPLComment | C99 | Digraphs | HexFloat) LineComment | C99 | Digraphs | HexFloat) // CUDA LANGSTANDARD(cuda, "cuda", "NVIDIA CUDA(tm)", BCPLComment | CPlusPlus | Digraphs) LineComment | CPlusPlus | Digraphs) #undef LANGSTANDARD
clang/include/clang/Lex/Lexer.h +2 −2 Original line number Diff line number Diff line Loading @@ -562,9 +562,9 @@ private: bool LexEndOfFile (Token &Result, const char *CurPtr); bool SkipWhitespace (Token &Result, const char *CurPtr); bool SkipBCPLComment (Token &Result, const char *CurPtr); bool SkipLineComment (Token &Result, const char *CurPtr); bool SkipBlockComment (Token &Result, const char *CurPtr); bool SaveBCPLComment (Token &Result, const char *CurPtr); bool SaveLineComment (Token &Result, const char *CurPtr); bool IsStartOfConflictMarker(const char *CurPtr); bool HandleEndOfConflictMarker(const char *CurPtr); Loading