[Lldb-commits] [PATCH] D17847: [SemaExprCXX] Avoid calling isInSystemHeader for invalid source locations

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Fri Mar 4 02:05:00 PST 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL262700: [SemaExprCXX] Avoid calling isInSystemHeader for invalid source locations (authored by labath).

Changed prior to commit:
  http://reviews.llvm.org/D17847?vs=49725&id=49805#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D17847

Files:
  cfe/trunk/lib/Sema/SemaExprCXX.cpp

Index: cfe/trunk/lib/Sema/SemaExprCXX.cpp
===================================================================
--- cfe/trunk/lib/Sema/SemaExprCXX.cpp
+++ cfe/trunk/lib/Sema/SemaExprCXX.cpp
@@ -1551,7 +1551,8 @@
   // new.
   if (PlacementArgs.empty() && OperatorNew &&
       (OperatorNew->isImplicit() ||
-       getSourceManager().isInSystemHeader(OperatorNew->getLocStart()))) {
+       (OperatorNew->getLocStart().isValid() &&
+        getSourceManager().isInSystemHeader(OperatorNew->getLocStart())))) {
     if (unsigned Align = Context.getPreferredTypeAlign(AllocType.getTypePtr())){
       unsigned SuitableAlign = Context.getTargetInfo().getSuitableAlign();
       if (Align > SuitableAlign)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17847.49805.patch
Type: text/x-patch
Size: 700 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160304/79b8e32d/attachment.bin>


More information about the lldb-commits mailing list