[clang] 057b6f5 - clang: Update libstdc++ issue workaround

Nathan Sidwell via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 20 11:34:53 PDT 2021


Author: Nathan Sidwell
Date: 2021-04-20T11:34:12-07:00
New Revision: 057b6f5d0b3ec1c1d0a87eb3d99ac4a46ca68cb4

URL: https://github.com/llvm/llvm-project/commit/057b6f5d0b3ec1c1d0a87eb3d99ac4a46ca68cb4
DIFF: https://github.com/llvm/llvm-project/commit/057b6f5d0b3ec1c1d0a87eb3d99ac4a46ca68cb4.diff

LOG: clang: Update libstdc++ issue workaround

Add some specificity to libstdc++ hack, perhaps we can remove it at a
later date.

Added: 
    

Modified: 
    clang/lib/Sema/SemaDeclCXX.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index 95eac2859b57..7a5f66d31105 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/lib/Sema/SemaDeclCXX.cpp
@@ -12134,10 +12134,9 @@ NamedDecl *Sema::BuildUsingDeclaration(
   // invalid).
   if (R.empty() &&
       NameInfo.getName().getNameKind() != DeclarationName::CXXConstructorName) {
-    // HACK: Work around a bug in libstdc++'s detection of ::gets. Sometimes
-    // it will believe that glibc provides a ::gets in cases where it does not,
-    // and will try to pull it into namespace std with a using-declaration.
-    // Just ignore the using-declaration in that case.
+    // HACK 2017-01-08: Work around an issue with libstdc++'s detection of
+    // ::gets. Sometimes it believes that glibc provides a ::gets in cases where
+    // it does not. The issue was fixed in libstdc++ 6.3 (2016-12-21) and later.
     auto *II = NameInfo.getName().getAsIdentifierInfo();
     if (getLangOpts().CPlusPlus14 && II && II->isStr("gets") &&
         CurContext->isStdNamespace() &&


        


More information about the cfe-commits mailing list