[clang] 0ff41c2 - Update libstdc++ hack comment

Nathan Sidwell via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 29 03:57:17 PDT 2021


Author: Nathan Sidwell
Date: 2021-04-29T03:57:10-07:00
New Revision: 0ff41c2ebc9904f881c958f9006bbf2b6bdc5d1e

URL: https://github.com/llvm/llvm-project/commit/0ff41c2ebc9904f881c958f9006bbf2b6bdc5d1e
DIFF: https://github.com/llvm/llvm-project/commit/0ff41c2ebc9904f881c958f9006bbf2b6bdc5d1e.diff

LOG: Update libstdc++ hack comment

This libstc++ hack isn't ready for removal. Updating the comment to
note what I found. While I have not proven Ville's
__is_throw_swappable patch made this go away, that patch did remove
the use of noexcept(noexcept(swap(....))). I'm not sure when gcc grew
deferred noexcept parsing.

Differential Revision: https://reviews.llvm.org/D101441

Added: 
    

Modified: 
    clang/lib/Sema/SemaExceptionSpec.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Sema/SemaExceptionSpec.cpp b/clang/lib/Sema/SemaExceptionSpec.cpp
index 54f9fb3db9e39..f0b9e6a5bc3ba 100644
--- a/clang/lib/Sema/SemaExceptionSpec.cpp
+++ b/clang/lib/Sema/SemaExceptionSpec.cpp
@@ -35,10 +35,12 @@ static const FunctionProtoType *GetUnderlyingFunction(QualType T)
   return T->getAs<FunctionProtoType>();
 }
 
-/// HACK: libstdc++ has a bug where it shadows std::swap with a member
-/// swap function then tries to call std::swap unqualified from the exception
-/// specification of that function. This function detects whether we're in
-/// such a case and turns off delay-parsing of exception specifications.
+/// HACK: 2014-11-14 libstdc++ had a bug where it shadows std::swap with a
+/// member swap function then tries to call std::swap unqualified from the
+/// exception specification of that function. This function detects whether
+/// we're in such a case and turns off delay-parsing of exception
+/// specifications. Libstdc++ 6.1 (released 2016-04-27) appears to have
+/// resolved it as side-effect of commit ddb63209a8d (2015-06-05).
 bool Sema::isLibstdcxxEagerExceptionSpecHack(const Declarator &D) {
   auto *RD = dyn_cast<CXXRecordDecl>(CurContext);
 


        


More information about the cfe-commits mailing list