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

Eugene Zelenko via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 25 11:28:05 PDT 2016


Eugene.Zelenko added inline comments.

================
Comment at: include/llvm/DebugInfo/PDB/PDBTypes.h:18
@@ -18,1 +17,3 @@
+#include <cstdint>
+#include <cstring>
 
----------------
joker.eph wrote:
> 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).
Sorry for misunderstanding.

Will be good idea to address this question to original authors. Probably the wanted to use implicit inlining (depended on optimization level).


Repository:
  rL LLVM

http://reviews.llvm.org/D18469





More information about the llvm-commits mailing list