[PATCH] D18469: [LLVM] Fix Clang-tidy modernize-deprecated-headers warnings in some files; other minor fixes

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 25 11:23:52 PDT 2016


joker.eph added inline comments.

================
Comment at: include/llvm/DebugInfo/PDB/PDBTypes.h:18
@@ -18,1 +17,3 @@
+#include <cstdint>
+#include <cstring>
 
----------------
Eugene.Zelenko wrote:
> joker.eph wrote:
> > Eugene.Zelenko wrote:
> > > joker.eph wrote:
> > > > why do we need cstring here? (You uploaded the patch without context, which makes it hard to figure here)
> > > Because of strcpy().
> > Note sure if it is legit to have this in a header. This header is included in many many places!
> But strcpy() is used in this header.
> 
> This is whole idea of Include What You Use: to make files dependencies self-containing, so there is no need to rely on other headers.
I'm not sure you got my point: "having the function that is using strcpy() in this header is not a good idea". Small header is better for compile time, and complicated methods can be defined in implementation file (when not templated).


Repository:
  rL LLVM

http://reviews.llvm.org/D18469





More information about the llvm-commits mailing list