diff options
author | Ben Langmuir <blangmuir@apple.com> | 2015-12-11 01:44:43 +0000 |
---|---|---|
committer | Ben Langmuir <blangmuir@apple.com> | 2015-12-11 01:44:43 +0000 |
commit | 38f2bfbbe49dc66cf33a542d3d00b115203e29eb (patch) | |
tree | 9cce899a8d5629c6386b6ee7ee209abe883d3cb0 /clang/lib/Sema/SemaDecl.cpp | |
parent | 1e5dfedae78fd6681830ee70b94b282c634cae0f (diff) | |
download | bcm5719-llvm-38f2bfbbe49dc66cf33a542d3d00b115203e29eb.tar.gz bcm5719-llvm-38f2bfbbe49dc66cf33a542d3d00b115203e29eb.zip |
Revert "[Modules] Fix regression when an elaborated-type-specifier mentions a hidden tag"
This is causing assertion failures; reverting until I can fix.
This reverts commit r255267
llvm-svn: 255324
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 1d8f9b7d203..af5fdc95c90 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -12121,12 +12121,10 @@ Decl *Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK, // In C++, we need to do a redeclaration lookup to properly // diagnose some problems. - // FIXME: this lookup is also used (with and without C++) to find a hidden - // declaration so that we don't get ambiguity errors when using a type - // declared by an elaborated-type-specifier. In C that is not correct and - // we should instead merge compatible types found by lookup. - Previous.setRedeclarationKind(ForRedeclaration); - LookupQualifiedName(Previous, SearchDC); + if (getLangOpts().CPlusPlus) { + Previous.setRedeclarationKind(ForRedeclaration); + LookupQualifiedName(Previous, SearchDC); + } } // If we have a known previous declaration to use, then use it. |