diff options
author | John McCall <rjmccall@apple.com> | 2013-04-02 02:48:58 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2013-04-02 02:48:58 +0000 |
commit | b421d926cdc632489915d39556f04c14f59d2392 (patch) | |
tree | 569f9f4c7324bdc780e0bf6b910830b620994f79 /include/clang/Sema/Sema.h | |
parent | 658a28479dd775f6ff2c07fa5699a7ea01e04127 (diff) | |
download | clang-b421d926cdc632489915d39556f04c14f59d2392.tar.gz clang-b421d926cdc632489915d39556f04c14f59d2392.tar.bz2 clang-b421d926cdc632489915d39556f04c14f59d2392.tar.xz |
Add -Wstatic-local-in-inline, which warns about using a static local
variable in a C99 inline (but not static-inline or extern-inline)
function definition.
The standard doesn't actually say that this doesn't apply to
"extern inline" definitions, but that seems like a useful extension,
and it at least doesn't have the obvious flaw that a static
mutable variable in an externally-available definition does.
rdar://13535367
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178520 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Sema/Sema.h')
-rw-r--r-- | include/clang/Sema/Sema.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h index a8f18fd571..7b07352d3c 100644 --- a/include/clang/Sema/Sema.h +++ b/include/clang/Sema/Sema.h @@ -1375,6 +1375,7 @@ public: // Returns true if the variable declaration is a redeclaration bool CheckVariableDeclaration(VarDecl *NewVD, LookupResult &Previous); void CheckCompleteVariableDeclaration(VarDecl *var); + void MaybeSuggestAddingStaticToDecl(const FunctionDecl *D); void ActOnStartFunctionDeclarator(); void ActOnEndFunctionDeclarator(); NamedDecl* ActOnFunctionDeclarator(Scope* S, Declarator& D, DeclContext* DC, |