summaryrefslogtreecommitdiff
path: root/test/Preprocessor/pragma_diagnostic.c
diff options
context:
space:
mode:
authorAndy Gibbs <andyg1001@hotmail.co.uk>2012-11-17 19:15:38 +0000
committerAndy Gibbs <andyg1001@hotmail.co.uk>2012-11-17 19:15:38 +0000
commit02a176871d91bba3004e4f94b2d4d588ae4b2122 (patch)
tree526b40ca59194f0bdb548e3ac2ae64983861c4c2 /test/Preprocessor/pragma_diagnostic.c
parentb9971bada4eeae74883b61ba96fc6d983b6b0e7f (diff)
downloadclang-02a176871d91bba3004e4f94b2d4d588ae4b2122.tar.gz
Refactored duplicate string literal lexing code within Preprocessor, into a
common LexStringLiteral function. In doing so, some consistency problems have been ironed out (e.g. where the first token in the string literal was lexed with macro expansion, but subsequent ones were not) and also an erroneous diagnostic has been corrected. LexStringLiteral is complemented by a FinishLexStringLiteral function which can be used in the situation where the first token of the string literal has already been lexed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168266 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Preprocessor/pragma_diagnostic.c')
-rw-r--r--test/Preprocessor/pragma_diagnostic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/Preprocessor/pragma_diagnostic.c b/test/Preprocessor/pragma_diagnostic.c
index 818f02f0b9..5c91079619 100644
--- a/test/Preprocessor/pragma_diagnostic.c
+++ b/test/Preprocessor/pragma_diagnostic.c
@@ -23,7 +23,7 @@
#define foo error
#pragma GCC diagnostic foo "-Wundef" // expected-warning {{pragma diagnostic expected 'error', 'warning', 'ignored', 'fatal', 'push', or 'pop'}}
-#pragma GCC diagnostic error 42 // expected-warning {{unexpected token in pragma diagnostic}}
+#pragma GCC diagnostic error 42 // expected-error {{expected string literal}}
#pragma GCC diagnostic error "-Wundef" 42 // expected-warning {{unexpected token in pragma diagnostic}}
#pragma GCC diagnostic error "invalid-name" // expected-warning {{pragma diagnostic expected option name (e.g. "-Wundef")}}