diff options
author | Richard Trieu <rtrieu@google.com> | 2016-09-13 01:37:01 +0000 |
---|---|---|
committer | Richard Trieu <rtrieu@google.com> | 2016-09-13 01:37:01 +0000 |
commit | e3a335ebd724f0ee206658bd19c571bdd5204c15 (patch) | |
tree | bcd9693be91bb6b71a74faa0fe78bee40d10585e /tools | |
parent | 3fdacc178fd2b752353fc6a0695d0be635bbbbc0 (diff) | |
download | clang-e3a335ebd724f0ee206658bd19c571bdd5204c15.tar.gz |
Handle empty message in static_asserts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281287 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/libclang/CIndex.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp index 0cc03c708e..8cbedd0ad8 100644 --- a/tools/libclang/CIndex.cpp +++ b/tools/libclang/CIndex.cpp @@ -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; } |