[cfe-dev] Sema && redefinitions
Anton Korobeynikov
asl at math.spbu.ru
Thu Dec 4 17:45:14 PST 2008
Hi, Douglas
> Couldn't you just scan the getPreviousDeclaration() chain backward, to
> find the first declaration of this function that contains the
> dllimport attribute? You can complain about that declaration, then
> remove the attribute from all of the declarations to silence any
> further warnings.
At this point (when we already saw the body) all attributes are already
merged thus we cannot distinguish the following two cases:
1. Definition originally contained attribute applied
2. Attribute was on prev. declaration
> If you've processed the whole translation unit, you could look up the
> most recent declaration of 'foo'
How?
--
With best regards, Anton Korobeynikov.
Faculty of Mathematics & Mechanics, Saint Petersburg State University.
More information about the cfe-dev
mailing list