diff options
author | Jordan Rose <jordan_rose@apple.com> | 2012-06-21 05:54:50 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2012-06-21 05:54:50 +0000 |
commit | 815fe26ed35a0ff22b176c2c76bb0c0b2d9c16d9 (patch) | |
tree | 6de76fb2d6ec53d699a18187176c6d1aeed2bdd6 /llvm/test | |
parent | f0dcac6800d3dbfa18934a44a0599d43d037d4cc (diff) | |
download | bcm5719-llvm-815fe26ed35a0ff22b176c2c76bb0c0b2d9c16d9.tar.gz bcm5719-llvm-815fe26ed35a0ff22b176c2c76bb0c0b2d9c16d9.zip |
Don't warn for -Wstatic-in-inline if the used function is also inline.
Also, don't warn if the used function is __attribute__((const)), in which case
it's not supposed to use global variables anyway.
The inline-in-inline thing is a heuristic, and one that's possibly incorrect
fairly often because the function being inlined could definitely use global
variables. However, even some C standard library functions are written using
other (trivial) static-inline functions in the headers, and we definitely don't
want to be warning on that (or on anything that /uses/ these trivial inline
functions). So we're using "inlined" as a marker for "fairly trivial".
(Note that __attribute__((pure)) does /not/ guarantee safety like ((const),
because ((const)) does not guarantee that global variables are not being used,
and the warning is about globals not being shared across TUs.)
llvm-svn: 158898
Diffstat (limited to 'llvm/test')
0 files changed, 0 insertions, 0 deletions