[cfe-dev] Two FunctionTemplateSpecializationInfo per explicit specialization?

Rafael EspĂ­ndola rafael.espindola at gmail.com
Sun Apr 29 14:54:44 PDT 2012


I am trying to implement a missing warning for

class zed {
};
class DEFAULT zed;

when building with -fvisibility=hidden.

but I am stuck at a false positive in

template <class Element>
 __attribute__((visibility("default"))) bool foo() {
}
template <> __attribute__((visibility("default")))
bool foo<int>();

We create two Decls for foo<int> (and two
FunctionTemplateSpecializationInfo). One of which has no attribute in
it, so the warning gets confused. Why do we create two
FunctionTemplateSpecializationInfo per explicit specialization?

Cheers,
Rafael



More information about the cfe-dev mailing list