kadircet created this revision.
Herald added a subscriber: arphaman.
Herald added a project: All.
kadircet requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Similar to D146426 <https://reviews.llvm.org/D146426>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D146634

Files:
  clang/lib/Index/USRGeneration.cpp


Index: clang/lib/Index/USRGeneration.cpp
===================================================================
--- clang/lib/Index/USRGeneration.cpp
+++ clang/lib/Index/USRGeneration.cpp
@@ -262,6 +262,12 @@
 
   // Mangle in type information for the arguments.
   for (auto *PD : D->parameters()) {
+    // FIXME: Make sure we don't have nullptrs in parameter lists of function
+    // decls.
+    if (!PD) {
+      IgnoreResults = true;
+      return;
+    }
     Out << '#';
     VisitType(PD->getType());
   }


Index: clang/lib/Index/USRGeneration.cpp
===================================================================
--- clang/lib/Index/USRGeneration.cpp
+++ clang/lib/Index/USRGeneration.cpp
@@ -262,6 +262,12 @@
 
   // Mangle in type information for the arguments.
   for (auto *PD : D->parameters()) {
+    // FIXME: Make sure we don't have nullptrs in parameter lists of function
+    // decls.
+    if (!PD) {
+      IgnoreResults = true;
+      return;
+    }
     Out << '#';
     VisitType(PD->getType());
   }
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to