]> granicus.if.org Git - clang/commit
Extend builtin "attribute" syntax to include a notation for
authorDouglas Gregor <dgregor@apple.com>
Sat, 14 Feb 2009 00:32:47 +0000 (00:32 +0000)
committerDouglas Gregor <dgregor@apple.com>
Sat, 14 Feb 2009 00:32:47 +0000 (00:32 +0000)
commita316e7b735b12ce6b34961a9dcfaae34f4b08d29
treea0ea5c12323051f468421c77c8a9eeb572a6ff60
parent7e4966e92dcf14567b59f5df4714b6562af57480
Extend builtin "attribute" syntax to include a notation for
printf-like functions, both builtin functions and those in the
C library. The function-call checker now queries this attribute do
determine if we have a printf-like function, rather than scanning
through the list of "known functions IDs". However, there are 5
functions they are not yet "builtins", so the function-call checker
handles them specifically still:

  - fprintf and vfprintf: the builtins mechanism cannot (yet)
    express FILE* arguments, so these can't be encoded.
  - NSLog: the builtins mechanism cannot (yet) express NSString*
    arguments, so this (and NSLogv) can't be encoded.
  - asprintf and vasprintf: these aren't part of the C99 standard
    library, so we really shouldn't be defining them as builtins in
    the general case (and we don't seem to have the machinery to make
    them builtins only on certain targets and depending on whether
    extensions are enabled).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64512 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/Builtins.def
include/clang/AST/Builtins.h
lib/AST/Builtins.cpp
lib/Sema/Sema.cpp
lib/Sema/Sema.h
lib/Sema/SemaChecking.cpp
lib/Sema/SemaDecl.cpp
test/Analysis/dead-stores.c
test/Analysis/uninit-vals.c
test/Rewriter/finally.m
test/Sema/block-return.c