r233980 - Correct typos in SEH filter expressions
Reid Kleckner
reid at kleckner.net
Thu Apr 2 15:09:32 PDT 2015
Author: rnk
Date: Thu Apr 2 17:09:32 2015
New Revision: 233980
URL: http://llvm.org/viewvc/llvm-project?rev=233980&view=rev
Log:
Correct typos in SEH filter expressions
Otherwise we assert due to uncorrected delayed typos.
Modified:
cfe/trunk/lib/Parse/ParseStmt.cpp
cfe/trunk/test/Sema/__try.c
Modified: cfe/trunk/lib/Parse/ParseStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseStmt.cpp?rev=233980&r1=233979&r2=233980&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseStmt.cpp (original)
+++ cfe/trunk/lib/Parse/ParseStmt.cpp Thu Apr 2 17:09:32 2015
@@ -476,7 +476,7 @@ StmtResult Parser::ParseSEHExceptBlock(S
{
ParseScopeFlags FilterScope(this, getCurScope()->getFlags() |
Scope::SEHFilterScope);
- FilterExpr = ParseExpression();
+ FilterExpr = Actions.CorrectDelayedTyposInExpr(ParseExpression());
}
if (getLangOpts().Borland) {
Modified: cfe/trunk/test/Sema/__try.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/__try.c?rev=233980&r1=233979&r2=233980&view=diff
==============================================================================
--- cfe/trunk/test/Sema/__try.c (original)
+++ cfe/trunk/test/Sema/__try.c Thu Apr 2 17:09:32 2015
@@ -281,3 +281,9 @@ void test_jump_out_of___finally() {
}();
}
}
+
+void test_typo_in_except() {
+ __try {
+ } __except(undeclared_identifier) { // expected-error {{use of undeclared identifier 'undeclared_identifier'}} expected-error {{expected expression}}
+ }
+}
More information about the cfe-commits
mailing list