aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/typo-correction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/typo-correction.cpp')
-rw-r--r--test/SemaCXX/typo-correction.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/SemaCXX/typo-correction.cpp b/test/SemaCXX/typo-correction.cpp
index 324900150c7f..174b1403e2db 100644
--- a/test/SemaCXX/typo-correction.cpp
+++ b/test/SemaCXX/typo-correction.cpp
@@ -634,3 +634,9 @@ namespace testArraySubscriptIndex {
}
};
}
+
+namespace crash_has_include {
+int has_include(int); // expected-note {{'has_include' declared here}}
+// expected-error@+1 {{__has_include must be used within a preprocessing directive}}
+int foo = __has_include(42); // expected-error {{use of undeclared identifier '__has_include'; did you mean 'has_include'?}}
+}