pcc added inline comments.
================ Comment at: lib/CodeGen/CodeGenModule.cpp:934 + if (CodeGenOpts.SanitizeCfiCrossDso) + CreateFunctionTypeMetadata(dyn_cast<FunctionDecl>(D), F); } ---------------- It looks like we can get here with declarations that are not of type `FunctionDecl` (mostly via `SetInternalFunctionAttributes` -- see http://llvm-cs.pcc.me.uk/tools/clang/lib/CodeGen/CodeGenModule.cpp/rSetInternalFunctionAttributes). I suppose that either means you would need to tolerate null pointers in `CreateFunctionTypeMetadata` or add an `isa` check here. Please also add a test for one of those cases. Repository: rL LLVM https://reviews.llvm.org/D26164 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits