summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema
diff options
context:
space:
mode:
authorErik Pilkington <erik.pilkington@gmail.com>2016-06-13 20:56:45 +0000
committerErik Pilkington <erik.pilkington@gmail.com>2016-06-13 20:56:45 +0000
commit142a87489053e664125909f41cf211b5b45ad628 (patch)
tree167d5f2687680ce1bd755364cde45bafddcb9259 /clang/test/Sema
parentf42103ce8b38a1a534ae08a5f44ec28a8df034fe (diff)
downloadbcm5719-llvm-142a87489053e664125909f41cf211b5b45ad628.tar.gz
bcm5719-llvm-142a87489053e664125909f41cf211b5b45ad628.zip
[Parser] Only correct delayed typos when needed
ActOnBinOp corrects delayed typos when in C mode; don't correct them in that case. Fixes PR26700. Differential Revision: http://reviews.llvm.org/D20490 llvm-svn: 272587
Diffstat (limited to 'clang/test/Sema')
-rw-r--r--clang/test/Sema/typo-correction.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/Sema/typo-correction.c b/clang/test/Sema/typo-correction.c
index 53b3b67ef2b..a1107a25ee5 100644
--- a/clang/test/Sema/typo-correction.c
+++ b/clang/test/Sema/typo-correction.c
@@ -57,3 +57,11 @@ void fn2() {
}
int d = X ? d : L; // expected-error 2 {{use of undeclared identifier}}
+
+int fn_with_ids() { ID = ID == ID >= ID ; } // expected-error 4 {{use of undeclared identifier}}
+
+int fn_with_rs(int r) { r = TYPO + r * TYPO; } // expected-error 2 {{use of undeclared identifier}}
+
+void fn_with_unknown(int a, int b) {
+ fn_with_unknown(unknown, unknown | unknown); // expected-error 3 {{use of undeclared identifier}}
+}
OpenPOWER on IntegriCloud