tk1012 added a comment. Description of the Sema::BuildTypeTrait()
================ Comment at: lib/AST/ASTImporter.cpp:5631 + // Value is always false. + bool ToValue = (!E->isValueDependent()) ? E->getValue() : false; + ---------------- According to Sema::BuildTypeTrait() in lib/Sema/SemaExprCXX.cpp, if an argument of TypeTraitExpr has a dependent type, TypeTraitExpr's value (`Result`) is always false. ``` ExprResult Sema::BuildTypeTrait(TypeTrait Kind, SourceLocation KWLoc, .... bool Dependent = false; for (unsigned I = 0, N = Args.size(); I != N; ++I) { if (Args[I]->getType()->isDependentType()) { Dependent = true; break; } } bool Result = false; if (!Dependent) Result = evaluateTypeTrait(*this, Kind, KWLoc, Args, RParenLoc); return TypeTraitExpr::Create(Context, ResultType, KWLoc, Kind, Args, RParenLoc, Result); ... ``` https://reviews.llvm.org/D39722 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits