summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/typo-correction.c
diff options
context:
space:
mode:
authorKaelyn Takata <rikka@google.com>2015-05-01 19:36:25 +0000
committerKaelyn Takata <rikka@google.com>2015-05-01 19:36:25 +0000
commit5a5319062300166a747807339349766341a2c2b2 (patch)
treeeb7754fd23e4587b49e7c22831519d5201d7c9cf /clang/test/Sema/typo-correction.c
parent06b21daf008f0bb9426d06f819322a8709094838 (diff)
downloadbcm5719-llvm-5a5319062300166a747807339349766341a2c2b2.tar.gz
bcm5719-llvm-5a5319062300166a747807339349766341a2c2b2.zip
Eagerly correct typos in ParenExprs that may be type casts for non-C++ code.
This is needed to ensure the type casts are parsed properly. Fixes PR23101. llvm-svn: 236337
Diffstat (limited to 'clang/test/Sema/typo-correction.c')
-rw-r--r--clang/test/Sema/typo-correction.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/Sema/typo-correction.c b/clang/test/Sema/typo-correction.c
index be9a1f3e482..d457257b3c3 100644
--- a/clang/test/Sema/typo-correction.c
+++ b/clang/test/Sema/typo-correction.c
@@ -34,3 +34,9 @@ int c11Generic(int arg) {
_Generic(hello, int : banana)(); // expected-error-re {{use of undeclared identifier 'hello'{{$}}}}
_Generic(arg, int : bandana)(); // expected-error {{use of undeclared identifier 'bandana'; did you mean 'banana'?}}
}
+
+typedef long long __m128i __attribute__((__vector_size__(16)));
+int PR23101(__m128i __x) {
+ return foo((__v2di)__x); // expected-warning {{implicit declaration of function 'foo'}} \
+ // expected-error {{use of undeclared identifier '__v2di'}}
+}
OpenPOWER on IntegriCloud