[clang] e90792d - [clang] Update comments on another libstdc++ HACK
Nathan Sidwell via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 30 09:29:43 PDT 2021
Author: Nathan Sidwell
Date: 2021-04-30T09:29:26-07:00
New Revision: e90792d8c78bac79a1a39f245e222684ea24c7c0
URL: https://github.com/llvm/llvm-project/commit/e90792d8c78bac79a1a39f245e222684ea24c7c0
DIFF: https://github.com/llvm/llvm-project/commit/e90792d8c78bac79a1a39f245e222684ea24c7c0.diff
LOG: [clang] Update comments on another libstdc++ HACK
Document relevant gcc versions and dates.
Differential Revision: https://reviews.llvm.org/D101530
Added:
Modified:
clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
Removed:
################################################################################
diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
index dc1e0ef60cac..cd0f13b9e32e 100644
--- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -856,10 +856,11 @@ Decl *TemplateDeclInstantiator::InstantiateTypedefNameDecl(TypedefNameDecl *D,
SemaRef.MarkDeclarationsReferencedInType(D->getLocation(), DI->getType());
}
- // HACK: g++ has a bug where it gets the value kind of ?: wrong.
- // libstdc++ relies upon this bug in its implementation of common_type.
- // If we happen to be processing that implementation, fake up the g++ ?:
- // semantics. See LWG issue 2141 for more information on the bug.
+ // HACK: 2012-10-23 g++ has a bug where it gets the value kind of ?: wrong.
+ // libstdc++ relies upon this bug in its implementation of common_type. If we
+ // happen to be processing that implementation, fake up the g++ ?:
+ // semantics. See LWG issue 2141 for more information on the bug. The bugs
+ // are fixed in g++ and libstdc++ 4.9.0 (2014-04-22).
const DecltypeType *DT = DI->getType()->getAs<DecltypeType>();
CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(D->getDeclContext());
if (DT && RD && isa<ConditionalOperator>(DT->getUnderlyingExpr()) &&
More information about the cfe-commits
mailing list