Skip to content
  • Ted Kremenek's avatar
    Modified format-string checking to not emit a warning when all of the · 3fbeaea7
    Ted Kremenek authored
    following hold:
    
    (1) A vprintf-like function is called that takes the argument list via a
        via_list argument.
    
    (2) The format string is a non-literal that is the parameter value of
        the enclosing function, e.g:
        
        void logmessage(const char *fmt,...) { 
          va_list ap;
          va_start(ap,fmt);
          fprintf(fmt,ap);  // Do not emit a warning.
        }
        
    In the future this special case will be enhanced to consult the "format"
    attribute attached to a function declaration instead of just allowing a blank
    check for all function parameters to be used as format strings to vprintf-like
    functions. This will happen when more support for attributes becomes
    available.
    
    llvm-svn: 45114
    3fbeaea7
Loading