summaryrefslogtreecommitdiffstats
path: root/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
commita7f937283f70818d69b0d4b1678c28a4a6f3c4cd (patch)
tree361c312c25ec2f1dd0ec4581dd411b27016a3508 /test/SemaCXX/typo-correction-delayed.cpp
parent68d4a96ad779831d62f6226724d3005ea560c1df (diff)
Ensure that any TypoExprs in the arguments to bultins with custom type
checking are handled before the custom type checking is performed. Fixes PR21669. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222797 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/typo-correction-delayed.cpp')
-rw-r--r--test/SemaCXX/typo-correction-delayed.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/SemaCXX/typo-correction-delayed.cpp b/test/SemaCXX/typo-correction-delayed.cpp
index 124f0ec2a1..bff1d7633f 100644
--- a/test/SemaCXX/typo-correction-delayed.cpp
+++ b/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'{{$}}}}
+}
+}