ogoffart abandoned this revision.
ogoffart marked an inline comment as done.
ogoffart added a comment.
commited as r249982. (I forgot to add the link to reviews.llvm.org in the
commit message. I'll do it next time)
http://reviews.llvm.org/D13344
__
rsmith added inline comments.
Comment at: lib/Sema/SemaStmt.cpp:505-506
@@ -512,1 +504,4 @@
+ } else {
+ConditionExpr = new (Context) OpaqueValueExpr(SourceLocation(),
+ Context.VoidTy, VK_RValue);
}
Please
ogoffart updated this revision to Diff 37035.
ogoffart added a comment.
The updated patch uses OpaqueValueExpr
http://reviews.llvm.org/D13344
Files:
lib/Sema/SemaStmt.cpp
test/Misc/ast-dump-invalid.cpp
Index: test/Misc/ast-dump-invalid.cpp
==
ogoffart added a comment.
Are the analysis run if there is an error? I think the consumer should expect
null condition anyway.
But i'll try to add an ErrorExpr anyway.
http://reviews.llvm.org/D13344
___
cfe-commits mailing list
cfe-commits@lists.
rsmith added inline comments.
Comment at: lib/Sema/SemaStmt.cpp:508-509
@@ -513,6 +507,4 @@
- DiagnoseUnusedExprResult(elseStmt);
-
return new (Context) IfStmt(Context, IfLoc, ConditionVar, ConditionExpr,
thenStmt, ElseLoc, elseStmt);
}
--
klimek added a reviewer: rsmith.
klimek added a comment.
+Richard, whom we need to validate AST changes to make sure they're benign.
http://reviews.llvm.org/D13344
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin
milianw added a comment.
Is there still an error reported for the invalid condition?
Anyhow, from my POV this is excellent and should fix a bunch of issues I've
seen when using clang-c in KDevelop. I never got around to investigating it,
but it always was related to conditionals. I'm pretty sur
ogoffart created this revision.
ogoffart added a reviewer: cfe-commits.
This is quite useful for IDE's or other tools which would like to recover as
much as possible even if there are a few errors in the code, and discarding
the full 'if' bodies is unfortunate.
http://reviews.llvm.org/D13344
F