[PATCH] D17069: [clang-tidy] Fix an assert failure in 'readability-braces-around-statements' check.
Alexander Kornienko via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 10 07:34:19 PST 2016
alexfh accepted this revision.
alexfh added a comment.
This revision is now accepted and ready to land.
Looks good with one possible improvement. Thank you!
================
Comment at: clang-tidy/readability/BracesAroundStatementsCheck.cpp:181
@@ +180,3 @@
+ // IfStmt. Avoid triggering assert failure.
+ if (isa<OpaqueValueExpr>(S->getCond()))
+ return SourceLocation();
----------------
Maybe just replace the assertion with
if (!CondEndLoc.isValid())
return SourceLocation();
?
Repository:
rL LLVM
http://reviews.llvm.org/D17069
More information about the cfe-commits
mailing list