]> granicus.if.org Git - clang/commitdiff
fix PR3609, emit:
authorChris Lattner <sabre@nondot.org>
Thu, 19 Feb 2009 18:29:56 +0000 (18:29 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 19 Feb 2009 18:29:56 +0000 (18:29 +0000)
t.c:1:10: error: missing terminating '>' character
#include <stdio.h
         ^

instead of:

t.c:1:10: error: missing terminating " character
#include <stdio.h
         ^

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

include/clang/Basic/DiagnosticLexKinds.def
lib/Lex/Lexer.cpp

index ad08ba976cb45264e8fc29cb79a849674174e6fa..f1d918ea0286da454cde42b7fa072b0eaa6d78dd 100644 (file)
@@ -55,9 +55,11 @@ DIAG(ext_token_used, EXTENSION,
      "extension used")
 
 DIAG(err_unterminated_string, ERROR,
-     "missing terminating \" character")
+     "missing terminating '\"' character")
 DIAG(err_unterminated_char, ERROR,
      "missing terminating ' character")
+DIAG(err_unterminated_angled_string, ERROR,
+     "missing terminating '>' character")
 DIAG(err_empty_character, ERROR,
      "empty character constant")
 DIAG(err_unterminated_block_comment, ERROR,
index 5f325220206af6a043429d5714ba496776e532a1..efbd84c879e2a5a32b227c2e8ef6ccc25e838144 100644 (file)
@@ -687,7 +687,7 @@ void Lexer::LexAngledStringLiteral(Token &Result, const char *CurPtr) {
     } else if (C == '\n' || C == '\r' ||             // Newline.
                (C == 0 && CurPtr-1 == BufferEnd)) {  // End of file.
       if (!isLexingRawMode())
-        Diag(BufferPtr, diag::err_unterminated_string);
+        Diag(BufferPtr, diag::err_unterminated_angled_string);
       FormTokenWithChars(Result, CurPtr-1, tok::unknown);
       return;
     } else if (C == 0) {