| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Summary: Just like templates, they are excepted from the ODR rule.
Reviewed By: aaron.ballman, rsmith
Differential Revision: https://reviews.llvm.org/D68923
(cherry picked from commit 27684ae66d5545f211c0ac4393d0ba2bf3b5b47c)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
I've found that most often the proper way to fix this warning is to add
`static`, because if the code otherwise compiles and links, the function
or variable is apparently not needed outside of the TU.
We can't provide a fix-it hint for variable declarations, because
multiple VarDecls can share the same type, and if we put static in front
of that, we affect all declared variables, some of which might have
previous declarations.
We also provide no fix-it hint for the rare case of an `extern` function
definition, because that would require removing `extern` and I have no
idea how to get the source location of the storage class specifier from
a FunctionDecl. I believe this information is only available earlier in
the AST construction from DeclSpec::getStorageClassSpecLoc(), but we
don't have that here.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D59402
llvm-svn: 363749
|
|
|
|
|
|
| |
variable templates, and instantiations thereof.
llvm-svn: 322030
|
|
|
|
|
|
|
| |
We shouldn't throw a warning when the static keyword is not present in
an anonymous namespace, just like we do for -Wmissing-prototypes.
llvm-svn: 290443
|
|
|
|
|
|
|
|
| |
This issue was introduced in r181677.
PR17349.
llvm-svn: 191339
|
|
Move C++ test into SemaCXX.
llvm-svn: 166616
|