------------------------------------------------------------------------
r281287 | rtrieu | 2016-09-12 18:37:01 -0700 (Mon, 12 Sep 2016) | 2 lines
Handle empty message in static_asserts.
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_39@286918
91177308-0d34-0410-b5e6-
96231b3b80d8
bool CursorVisitor::VisitStaticAssertDecl(StaticAssertDecl *D) {
if (Visit(MakeCXCursor(D->getAssertExpr(), StmtParent, TU, RegionOfInterest)))
return true;
- if (Visit(MakeCXCursor(D->getMessage(), StmtParent, TU, RegionOfInterest)))
- return true;
+ if (StringLiteral *Message = D->getMessage())
+ if (Visit(MakeCXCursor(Message, StmtParent, TU, RegionOfInterest)))
+ return true;
return false;
}