]> granicus.if.org Git - clang/commit
Add support for analyzing FreeBSD kernel printf extensions.
authorDimitry Andric <dimitry@andric.com>
Thu, 19 Feb 2015 22:32:33 +0000 (22:32 +0000)
committerDimitry Andric <dimitry@andric.com>
Thu, 19 Feb 2015 22:32:33 +0000 (22:32 +0000)
commita53dd09cce30ae5c732ea37efbb1400923b04d70
treed6950adc744c0843a9c746252f338832d384dc7e
parent3032d1e2769b0d9df89a17bb4fdde6112c5eabb8
Add support for analyzing FreeBSD kernel printf extensions.

This adds a new __freebsd_kprintf__ format string type, which enables
checking when used in __attribute__((format(...))) attributes.  It can
check the FreeBSD kernel specific %b, %D, %r and %y specifiers, using
existing diagnostic messages.  Also adds test cases for all these
specifiers.

Differential Revision: http://reviews.llvm.org/D7154

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@229921 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Analysis/Analyses/FormatString.h
include/clang/Sema/Sema.h
lib/Analysis/FormatString.cpp
lib/Analysis/PrintfFormatString.cpp
lib/Sema/SemaChecking.cpp
lib/Sema/SemaDeclAttr.cpp
test/Sema/attr-format.c
test/Sema/format-strings-freebsd.c [new file with mode: 0644]