[PATCH] D92109: [ASTImporter] Support import of CXXDeductionGuideDecl

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 30 16:36:01 PST 2020


rnk added inline comments.


================
Comment at: clang/lib/AST/ASTImporter.cpp:3336
+    if (Fun->getExplicitSpecifier().getExpr()) {
+      ExplicitExpr = importChecked(Err, Fun->getExplicitSpecifier().getExpr());
+      if (Err)
----------------
GCC 5.3 complained about this, so I rewrote it a different way without generic lambdas in rG43b5b485a203f190ee4d5d3cab19c44ca865d316.

Error spew:
```
FAILED: tools/clang/lib/AST/CMakeFiles/obj.clangAST.dir/ASTImporter.cpp.o 
/b/s/w/ir/cache/builder/src/third_party/llvm-build-tools/gcc530trusty/bin/g++  -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/clang/lib/AST -I/b/s/w/ir/cache/builder/src/third_party/llvm/clang/lib/AST -I/b/s/w/ir/cache/builder/src/third_party/llvm/clang/include -Itools/clang/include -Iinclude -I/b/s/w/ir/cache/builder/src/third_party/llvm/llvm/include -DLLVM_FORCE_HEAD_REVISION -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3     -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -UNDEBUG -std=c++14 -MD -MT tools/clang/lib/AST/CMakeFiles/obj.clangAST.dir/ASTImporter.cpp.o -MF tools/clang/lib/AST/CMakeFiles/obj.clangAST.dir/ASTImporter.cpp.o.d -o tools/clang/lib/AST/CMakeFiles/obj.clangAST.dir/ASTImporter.cpp.o -c /b/s/w/ir/cache/builder/src/third_party/llvm/clang/lib/AST/ASTImporter.cpp
/b/s/w/ir/cache/builder/src/third_party/llvm/clang/lib/AST/ASTImporter.cpp: In instantiation of ‘clang::ASTNodeImporter::VisitFunctionDecl(clang::FunctionDecl*)::<lambda(auto:1*)> [with auto:1 = clang::CXXConversionDecl; clang::ExpectedExpr = llvm::Expected<clang::Expr*>]’:
/b/s/w/ir/cache/builder/src/third_party/llvm/clang/lib/AST/ASTImporter.cpp:3384:66:   required from here
/b/s/w/ir/cache/builder/src/third_party/llvm/clang/lib/AST/ASTImporter.cpp:3336:20: error: cannot call member function ‘T clang::ASTNodeImporter::importChecked(llvm::Error&, const T&) [with T = clang::Expr*]’ without object
       ExplicitExpr = importChecked(Err, Fun->getExplicitSpecifier().getExpr());
                    ^
/b/s/w/ir/cache/builder/src/third_party/llvm/clang/lib/AST/ASTImporter.cpp: In instantiation of ‘clang::ASTNodeImporter::VisitFunctionDecl(clang::FunctionDecl*)::<lambda(auto:1*)> [with auto:1 = clang::CXXDeductionGuideDecl; clang::ExpectedExpr = llvm::Expected<clang::Expr*>]’:
/b/s/w/ir/cache/builder/src/third_party/llvm/clang/lib/AST/ASTImporter.cpp:3402:57:   required from here
/b/s/w/ir/cache/builder/src/third_party/llvm/clang/lib/AST/ASTImporter.cpp:3336:20: error: cannot call member function ‘T clang::ASTNodeImporter::importChecked(llvm::Error&, const T&) [with T = clang::Expr*]’ without object
[3456/5141] Building CXX object tools/clang/lib/AST/CMakeFiles/obj.clangAST.dir/InheritViz.cpp.o
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92109



More information about the cfe-commits mailing list