r281287 - Handle empty message in static_asserts.
Richard Trieu via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 12 18:37:02 PDT 2016
Author: rtrieu
Date: Mon Sep 12 20:37:01 2016
New Revision: 281287
URL: http://llvm.org/viewvc/llvm-project?rev=281287&view=rev
Log:
Handle empty message in static_asserts.
Modified:
cfe/trunk/tools/libclang/CIndex.cpp
Modified: cfe/trunk/tools/libclang/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndex.cpp?rev=281287&r1=281286&r2=281287&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CIndex.cpp (original)
+++ cfe/trunk/tools/libclang/CIndex.cpp Mon Sep 12 20:37:01 2016
@@ -1243,8 +1243,9 @@ bool CursorVisitor::VisitUnresolvedUsing
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;
}
More information about the cfe-commits
mailing list