diff options
| author | Douglas Gregor <dgregor@apple.com> | 2009-02-24 01:23:02 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2009-02-24 01:23:02 +0000 |
| commit | e62c0a45dd54045a523b6cf1c657d3bbc9a81404 (patch) | |
| tree | 39f3dc4eef45c3157db0a8d2a809a2cebb91112a /clang/lib/Sema/Sema.h | |
| parent | e6698847490224d4ade0a5e0f1c8784f23201c0b (diff) | |
| download | bcm5719-llvm-e62c0a45dd54045a523b6cf1c657d3bbc9a81404.tar.gz bcm5719-llvm-e62c0a45dd54045a523b6cf1c657d3bbc9a81404.zip | |
Improve merging of function declarations. Specifically:
- When we are declaring a function in local scope, we can merge with
a visible declaration from an outer scope if that declaration
refers to an entity with linkage. This behavior now works in C++
and properly ignores entities without linkage.
- Diagnose the use of "static" on a function declaration in local
scope.
- Diagnose the declaration of a static function after a non-static
declaration of the same function.
- Propagate the storage specifier to a function declaration from a
prior declaration (PR3425)
- Don't name-mangle "main"
llvm-svn: 65360
Diffstat (limited to 'clang/lib/Sema/Sema.h')
| -rw-r--r-- | clang/lib/Sema/Sema.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Sema/Sema.h b/clang/lib/Sema/Sema.h index 2a4b4657be6..60de821c476 100644 --- a/clang/lib/Sema/Sema.h +++ b/clang/lib/Sema/Sema.h @@ -265,7 +265,8 @@ public: bool &Redeclaration); NamedDecl* ActOnFunctionDeclarator(Scope* S, Declarator& D, DeclContext* DC, QualType R, Decl *LastDeclarator, - Decl* PrevDecl, bool IsFunctionDefinition, + NamedDecl* PrevDecl, + bool IsFunctionDefinition, bool& InvalidDecl, bool &Redeclaration); virtual DeclTy *ActOnParamDeclarator(Scope *S, Declarator &D); virtual void ActOnParamDefaultArgument(DeclTy *param, @@ -374,6 +375,7 @@ public: Decl *LastDecl); bool MergeTypeDefDecl(TypedefDecl *New, Decl *Old); bool MergeFunctionDecl(FunctionDecl *New, Decl *Old); + bool MergeCompatibleFunctionDecls(FunctionDecl *New, FunctionDecl *Old); bool MergeVarDecl(VarDecl *New, Decl *Old); bool MergeCXXFunctionDecl(FunctionDecl *New, FunctionDecl *Old); void CheckForFileScopedRedefinitions(Scope *S, VarDecl *VD); |

