[PATCH] D76384: Move FPFeatures from BinaryOperator bitfields to Trailing storage

Melanie Blower via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 16 07:48:46 PDT 2020


mibintc marked an inline comment as done.
mibintc added a subscriber: martong.
mibintc added inline comments.


================
Comment at: clang/lib/AST/ASTImporter.cpp:6821
+      E->getFPFeatures(Importer.getFromContext()),
+      importChecked(Err, ToComputationLHSType),
+      importChecked(Err, ToComputationResultType));
----------------
martong wrote:
> This introduced an assertion failure during CTU analysis. The reason is that the LHSType and the ResultType have been imported twice.
> 
> The fix is in e033ec291a1b72f307ab14569ca99822c127610b
> 
> Details:
> ```
>     clang: ../../git/llvm-project/clang/lib/Basic/SourceManager.cpp:918: clang::FileID clang::SourceManager::getFileIDLoaded(unsigned int) const: Assertion `0 && "Invalid SLocOffset or bad function choice"' failed.
>     clang::SourceManager::getDecomposedExpansionLoc(clang::SourceLocation) const
>     clang::SourceManager::getPresumedLoc(clang::SourceLocation, bool) const
>     clang::ASTImporter::Import(clang::SourceLocation)
>     llvm::Error clang::ASTImporter::importInto<clang::SourceLocation>(clang::SourceLocation&, clang::SourceLocation const&)
>     clang::ASTNodeImporter::ImportDeclParts(clang::NamedDecl*, clang::DeclContext*&, clang::DeclContext*&, clang::DeclarationName&, clang::NamedDecl*&, clang::SourceLocation&)
>     clang::ASTNodeImporter::VisitRecordDecl(clang::RecordDecl*)
>     clang::declvisitor::Base<std::add_pointer, clang::ASTNodeImporter, llvm::Expected<clang::Decl*> >::Visit(clang::Decl*)
>     clang::ASTImporter::Import(clang::Decl*)
>     clang::ASTNodeImporter::VisitRecordType(clang::RecordType const*)
>     clang::TypeVisitor<clang::ASTNodeImporter, llvm::Expected<clang::QualType> >::Visit(clang::Type const*)
>     clang::ASTImporter::Import(clang::QualType)
>     clang::ASTNodeImporter::VisitElaboratedType(clang::ElaboratedType const*)
>     clang::TypeVisitor<clang::ASTNodeImporter, llvm::Expected<clang::QualType> >::Visit(clang::Type const*)
>     clang::ASTImporter::Import(clang::QualType)
>     clang::ASTNodeImporter::VisitPointerType(clang::PointerType const*)
>     clang::TypeVisitor<clang::ASTNodeImporter, llvm::Expected<clang::QualType> >::Visit(clang::Type const*)
>     clang::ASTImporter::Import(clang::QualType)
>     clang::QualType clang::ASTNodeImporter::importChecked<clang::QualType>(llvm::Error&, clang::QualType const&)
>   
>  clang::ASTNodeImporter::VisitCompoundAssignOperator(clang::CompoundAssignOperator*)
> ```
@martong Thank you.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76384/new/

https://reviews.llvm.org/D76384





More information about the cfe-commits mailing list