diff options
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 2 | 
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 85b5963a39d..d1bb6fb453e 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -2736,7 +2736,7 @@ Sema::ActOnFunctionDeclarator(Scope* S, Declarator& D, DeclContext* DC,    ProcessDeclAttributes(S, NewFD, D);    // attributes declared post-definition are currently ignored -  if (PrevDecl) { +  if (Redeclaration && PrevDecl) {      const FunctionDecl *Def, *PrevFD = dyn_cast<FunctionDecl>(PrevDecl);      if (PrevFD && PrevFD->getBody(Def) && D.hasAttributes()) {        Diag(NewFD->getLocation(), diag::warn_attribute_precede_definition);  | 

