]> granicus.if.org Git - clang/commit
[ASTImporter] Fix in ASTImporter::Import_New(const Decl *)
authorBjorn Pettersson <bjorn.a.pettersson@ericsson.com>
Tue, 9 Apr 2019 09:12:32 +0000 (09:12 +0000)
committerBjorn Pettersson <bjorn.a.pettersson@ericsson.com>
Tue, 9 Apr 2019 09:12:32 +0000 (09:12 +0000)
commite15e2b1971ee51958ea8899484513e9378a9fc73
tree633eb55bdc7a521f9ceb98e7b42d39d0ecb1ebe9
parent764bd63e5b6b19051d14a3172ee82fb3e83b8857
[ASTImporter] Fix in ASTImporter::Import_New(const Decl *)

Make sure ASTImporter::Import_New(const Decl *) returns
a Expected<const Decl *> and not Expected<Decl *> to
make the clang/unittests/AST/ASTImporterTest.cpp compile
without the warning

 clang/unittests/AST/ASTImporterTest.cpp:117:12: error: no viable conversion from 'Expected<clang::Decl *>' to 'Expected<const clang::Decl *>'
    return Imported;

(I got the above when building with clang 3.6).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@357985 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/ASTImporter.h