[PATCH] D90073: [Clang][CodeGen] fix failed assertion

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 23 13:32:20 PDT 2020


erichkeane added inline comments.


================
Comment at: clang/lib/CodeGen/CodeGenModule.cpp:4643
+                                       D->getType().isConstQualified());
+    else if (isa<FunctionDecl>(GD.getDecl()))
+      LT = getFunctionLinkage(GD);
----------------
I'd suggest making this just 'else', that way you don't have to do the assert below.  The first line of getFunctionLinkage does the cast to FunctionDecl, so that part is already taken care of.




Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90073/new/

https://reviews.llvm.org/D90073



More information about the cfe-commits mailing list