summaryrefslogtreecommitdiffstats
path: root/clang/test/Preprocessor/has_include.c
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2018-03-28 04:16:13 +0000
committerRichard Trieu <rtrieu@google.com>2018-03-28 04:16:13 +0000
commitb402580616617a5c2d80f3d1c343b8f74bd7c3b5 (patch)
treed360a3d9382d397d8da2c23771a4e3a6f56bbe55 /clang/test/Preprocessor/has_include.c
parenta95b0df5eddbe7fa1e9f8fe0b1ff62427e1c0318 (diff)
downloadbcm5719-llvm-b402580616617a5c2d80f3d1c343b8f74bd7c3b5.tar.gz
bcm5719-llvm-b402580616617a5c2d80f3d1c343b8f74bd7c3b5.zip
Fix some handling of AST nodes with diagnostics.
The diagnostic system for Clang can already handle many AST nodes. Instead of converting them to strings first, just hand the AST node directly to the diagnostic system and let it handle the output. Minor changes in some diagnostic output. llvm-svn: 328688
Diffstat (limited to 'clang/test/Preprocessor/has_include.c')
-rw-r--r--clang/test/Preprocessor/has_include.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/test/Preprocessor/has_include.c b/clang/test/Preprocessor/has_include.c
index ad7329390ef..af1f6b8414e 100644
--- a/clang/test/Preprocessor/has_include.c
+++ b/clang/test/Preprocessor/has_include.c
@@ -93,19 +93,19 @@
// Try as non-preprocessor directives
void foo( void ) {
- __has_include_next("stdint.h") // expected-warning {{#include_next in primary source file}} expected-error {{__has_include_next must be used within a preprocessing directive}}
- __has_include("stdint.h") // expected-error {{__has_include must be used within a preprocessing directive}}
+ __has_include_next("stdint.h") // expected-warning {{#include_next in primary source file}} expected-error {{'__has_include_next' must be used within a preprocessing directive}}
+ __has_include("stdint.h") // expected-error {{'__has_include' must be used within a preprocessing directive}}
}
-MACRO1 // expected-error {{__has_include must be used within a preprocessing directive}}
+MACRO1 // expected-error {{'__has_include' must be used within a preprocessing directive}}
#if 1
-MACRO1 // expected-error {{__has_include must be used within a preprocessing directive}}
+MACRO1 // expected-error {{'__has_include' must be used within a preprocessing directive}}
#endif
#if 0
#elif 1
-MACRO1 // expected-error {{__has_include must be used within a preprocessing directive}}
+MACRO1 // expected-error {{'__has_include' must be used within a preprocessing directive}}
#endif
#if 0
@@ -148,7 +148,7 @@ MACRO1 // This should be fine because it is never actually reached
#if __has_include(stdint.h>)
#endif
-// expected-error@+1 {{__has_include must be used within a preprocessing directive}}
+// expected-error@+1 {{'__has_include' must be used within a preprocessing directive}}
__has_include
// expected-error@+1 {{missing ')' after '__has_include'}} // expected-error@+1 {{expected value in expression}} // expected-note@+1 {{to match this '('}}
OpenPOWER on IntegriCloud