[llvm-branch-commits] [cfe-branch] r286918 - Merging r281287:

Richard Trieu via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Nov 14 16:51:56 PST 2016


Author: rtrieu
Date: Mon Nov 14 18:51:55 2016
New Revision: 286918

URL: http://llvm.org/viewvc/llvm-project?rev=286918&view=rev
Log:
Merging r281287:
------------------------------------------------------------------------
r281287 | rtrieu | 2016-09-12 18:37:01 -0700 (Mon, 12 Sep 2016) | 2 lines

Handle empty message in static_asserts.

------------------------------------------------------------------------

Modified:
    cfe/branches/release_39/tools/libclang/CIndex.cpp

Modified: cfe/branches/release_39/tools/libclang/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_39/tools/libclang/CIndex.cpp?rev=286918&r1=286917&r2=286918&view=diff
==============================================================================
--- cfe/branches/release_39/tools/libclang/CIndex.cpp (original)
+++ cfe/branches/release_39/tools/libclang/CIndex.cpp Mon Nov 14 18:51:55 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 llvm-branch-commits mailing list