[cfe-dev] [RFC] unused argument warning
    Chad Rosier 
    mcrosier at apple.com
       
    Tue Aug  7 14:59:16 PDT 2012
    
    
  
All,
I would like to propose a fairly significant change to the unused argument warning (i.e., removing it for the most part), but wanted to get some feedback before investing a great deal of time.  In my opinion, the implementation of this warning is overly burdensome to maintain.  Worse yet, there are _many_ cases where the driver intentionally claims unused arguments to prevent this warning from being too verbose (e.g., clang -E -g t.c -o t.i); when linking the driver claims all CompileOnly arguments.  We should only be warning in cases where it would actually cause a problem (i.e., misspelled options or specifying options that conflict).  Conflicting options _should_ already be handled.  Detecting unknown or misspelled options is very straight forward to implement which doesn't require claim() calls to be sprinkled throughout the driver.
Mostly I'm looking for counter arguments as to why this warning should remain given the heavy burden..
 Chad
    
    
More information about the cfe-dev
mailing list