summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/typo-correction-delayed.cpp
diff options
context:
space:
mode:
authorKaelyn Takata <rikka@google.com>2014-11-25 23:04:09 +0000
committerKaelyn Takata <rikka@google.com>2014-11-25 23:04:09 +0000
commit443d61d62a36d2bca03ea98db5a0e811638d46b5 (patch)
tree476e9468cff11f92f198ee1848c0158b287fdf9b /clang/test/SemaCXX/typo-correction-delayed.cpp
parent371417db347317ffff9c9469b5ed85a6b3e98382 (diff)
downloadbcm5719-llvm-443d61d62a36d2bca03ea98db5a0e811638d46b5.tar.gz
bcm5719-llvm-443d61d62a36d2bca03ea98db5a0e811638d46b5.zip
Ensure that any TypoExprs in the arguments to bultins with custom type
checking are handled before the custom type checking is performed. Fixes PR21669. llvm-svn: 222797
Diffstat (limited to 'clang/test/SemaCXX/typo-correction-delayed.cpp')
-rw-r--r--clang/test/SemaCXX/typo-correction-delayed.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/typo-correction-delayed.cpp b/clang/test/SemaCXX/typo-correction-delayed.cpp
index 124f0ec2a1c..bff1d7633fc 100644
--- a/clang/test/SemaCXX/typo-correction-delayed.cpp
+++ b/clang/test/SemaCXX/typo-correction-delayed.cpp
@@ -93,3 +93,12 @@ void f(NestedNode *node) {
NestedNode *next = node->Next(); // expected-error-re {{no member named 'Next' in 'initializerCorrections::NestedNode'{{$}}}}
}
}
+
+namespace PR21669 {
+void f(int *i) {
+ // Check that arguments to a builtin with custom type checking are corrected
+ // properly, since calls to such builtins bypass much of the normal code path
+ // for building and checking the call.
+ __atomic_load(i, i, something_something); // expected-error-re {{use of undeclared identifier 'something_something'{{$}}}}
+}
+}
OpenPOWER on IntegriCloud