[PATCH] D12793: Three new security overflow builtins with generic argument types

David Grayson via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 27 14:32:15 PDT 2015


DavidEGrayson updated this revision to Diff 35825.
DavidEGrayson added a comment.

I have incorporated John McCall's feedback about variable naming.  I was able to remove most of the *QTy variables, but ResultQTy is used in several places and the expression to compute it is pretty long, so I kept it.

I would argue that a struct with a width and signedness does in fact define an integer type.  It's not a clang type or an LLVM type though.  But that's fine, I renamed those variables to be called *Info.

Is there a better place to stick getIntegerWidthAndSignedness?  It seems like a basic feature like this should be part of clang::Type or something.


http://reviews.llvm.org/D12793

Files:
  docs/LanguageExtensions.rst
  include/clang/Basic/Builtins.def
  include/clang/Basic/DiagnosticSemaKinds.td
  lib/CodeGen/CGBuiltin.cpp
  lib/Sema/SemaChecking.cpp
  test/CodeGen/builtins-overflow-error.c
  test/CodeGen/builtins-overflow.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12793.35825.patch
Type: text/x-patch
Size: 18618 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150927/b363898c/attachment.bin>


More information about the cfe-commits mailing list