diff options
author | Gabor Marton <martongabesz@gmail.com> | 2019-05-08 15:23:48 +0000 |
---|---|---|
committer | Gabor Marton <martongabesz@gmail.com> | 2019-05-08 15:23:48 +0000 |
commit | ce6b78128f7fde3b26b6cf66adc6c982cde90bb8 (patch) | |
tree | 107c1ba03e030f37d00e06c5ac36ad570db8db72 /clang/lib/AST/ASTImporter.cpp | |
parent | 9fd02a71a39b8e923e3a2ede6b9640871d503e2b (diff) | |
download | bcm5719-llvm-ce6b78128f7fde3b26b6cf66adc6c982cde90bb8.tar.gz bcm5719-llvm-ce6b78128f7fde3b26b6cf66adc6c982cde90bb8.zip |
[ASTImporter] Fix inequivalence of unresolved exception spec
Summary:
Structural equivalence of methods can falsely report false when the
exception specifier is unresolved (i.e unevaluated or not instantiated).
(This caused one assertion during bitcoin ctu-analysis.)
Reviewers: a_sidorin, shafik, a.sidorin
Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D61424
llvm-svn: 360261
Diffstat (limited to 'clang/lib/AST/ASTImporter.cpp')
-rw-r--r-- | clang/lib/AST/ASTImporter.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/AST/ASTImporter.cpp b/clang/lib/AST/ASTImporter.cpp index da0d68900af..7ce2abee6ce 100644 --- a/clang/lib/AST/ASTImporter.cpp +++ b/clang/lib/AST/ASTImporter.cpp @@ -3130,6 +3130,11 @@ ExpectedDecl ASTNodeImporter::VisitFunctionDecl(FunctionDecl *D) { auto *Recent = const_cast<FunctionDecl *>( FoundByLookup->getMostRecentDecl()); ToFunction->setPreviousDecl(Recent); + // FIXME Probably we should merge exception specifications. E.g. In the + // "To" context the existing function may have exception specification with + // noexcept-unevaluated, while the newly imported function may have an + // evaluated noexcept. A call to adjustExceptionSpec() on the imported + // decl and its redeclarations may be required. } // Import Ctor initializers. |