Skip to content
This repository has been archived by the owner on Apr 23, 2020. It is now read-only.

Commit

Permalink
Handle empty message in static_asserts.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281287 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Weverything committed Sep 13, 2016
1 parent 3fdacc1 commit e3a335e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tools/libclang/CIndex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1243,8 +1243,9 @@ bool CursorVisitor::VisitUnresolvedUsingTypenameDecl(
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;
}

Expand Down

0 comments on commit e3a335e

Please sign in to comment.