forked from OSchip/llvm-project
Fix up this compatibility hack to be more compatible with gcc.
llvm-svn: 72901
This commit is contained in:
parent
fd4b1559db
commit
319ce956a9
|
@ -575,10 +575,11 @@ void Sema::MergeTypeDefDecl(TypedefDecl *New, Decl *OldD) {
|
|||
|
||||
// If we have a redefinition of a typedef in C, emit a warning. This warning
|
||||
// is normally mapped to an error, but can be controlled with
|
||||
// -Wtypedef-redefinition. If either the original was in a system header,
|
||||
// don't emit this for compatibility with GCC.
|
||||
// -Wtypedef-redefinition. If either the original or the redefinition is
|
||||
// in a system header, don't emit this for compatibility with GCC.
|
||||
if (PP.getDiagnostics().getSuppressSystemWarnings() &&
|
||||
Context.getSourceManager().isInSystemHeader(Old->getLocation()))
|
||||
(Context.getSourceManager().isInSystemHeader(Old->getLocation()) ||
|
||||
Context.getSourceManager().isInSystemHeader(New->getLocation())))
|
||||
return;
|
||||
|
||||
Diag(New->getLocation(), diag::warn_redefinition_of_typedef)
|
||||
|
|
Loading…
Reference in New Issue