summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/typo-correction-delayed.cpp
diff options
context:
space:
mode:
authorKaelyn Takata <rikka@google.com>2014-12-08 22:41:42 +0000
committerKaelyn Takata <rikka@google.com>2014-12-08 22:41:42 +0000
commite789aab6353992a7a2b63c1f66bb9f78a473ae75 (patch)
tree67d5e9c64d240acc2611a18ae6c004019a15671a /test/SemaCXX/typo-correction-delayed.cpp
parentf5869c4ac58bc8d1ec1226a8d2cbf6ba8f7f83d1 (diff)
Handle possible TypoExprs in member initializers.
Includes a new test case since none of the existing tests were hitting this code path. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223705 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/typo-correction-delayed.cpp')
-rw-r--r--test/SemaCXX/typo-correction-delayed.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/SemaCXX/typo-correction-delayed.cpp b/test/SemaCXX/typo-correction-delayed.cpp
index f7ef01542e..d303b58554 100644
--- a/test/SemaCXX/typo-correction-delayed.cpp
+++ b/test/SemaCXX/typo-correction-delayed.cpp
@@ -112,3 +112,10 @@ void test_paren_suffix() {
foo::bar({5, 6}); // expected-error-re {{no member named 'bar' in namespace 'foo'{{$}}}} \
// expected-error {{expected expression}}
}
+
+const int kNum = 10; // expected-note {{'kNum' declared here}}
+class SomeClass {
+ int Kind;
+public:
+ explicit SomeClass() : Kind(kSum) {} // expected-error {{use of undeclared identifier 'kSum'; did you mean 'kNum'?}}
+};