[cfe-dev] handle __attribute__((deprecated))

Nuno Lopes nunoplopes at sapo.pt
Fri Feb 29 05:28:43 PST 2008


Hi,

Attached is a patch to add support for __attribute__((deprecated)). This 
patch also makes clang trigger a warning when using an attribute that isn't 
recognised (like gcc).
The test currently doesn't pass because attributes aren't being propagated 
when merging functions/vars definitions.

e.g.
void g() __attribute__((deprecated));
void g();

int a() {
  //should produce a warning. it does not as clang discards the old 
defnition and its attributes when merging
  g();
}


If there's interest, I'll provide patches to handle other __attributes__.

Nuno 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: clang_deprecated_attr.txt
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20080229/84cefa81/attachment.txt>


More information about the cfe-dev mailing list