don't assume that the anonymous struct will be part of the most recent
declaration of the typedef.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@280136
91177308-0d34-0410-b5e6-
96231b3b80d8
return nullptr;
if (auto *TND = dyn_cast<TypedefNameDecl>(Found))
- return TND->getAnonDeclWithTypedefName();
+ return TND->getAnonDeclWithTypedefName(/*AnyRedecl*/true);
return nullptr;
}
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/merge-name-for-linkage -verify %s
// expected-no-diagnostics
typedef union {} pthread_mutex_t;
+typedef pthread_mutex_t pthread_mutex_t;
#include "a.h"
pthread_mutex_t x;
#include "b.h"