r307600 - clang-import-test had some dead code. I did the following to eliminate it:
Sean Callanan via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 10 16:47:00 PDT 2017
Author: spyffe
Date: Mon Jul 10 16:47:00 2017
New Revision: 307600
URL: http://llvm.org/viewvc/llvm-project?rev=307600&view=rev
Log:
clang-import-test had some dead code. I did the following to eliminate it:
- eliminated error handling for the indirect CompilerInstance, which should
never generate an error as it is created;
- added a new test for direct importation; and
- removed an unused implementation of the CompleteType() API.
This brings clang-import-test.cpp and ExternalASTMerge.cpp back to 100%
coverage on all metrics measured by DLLVM_BUILD_INSTRUMENTED_COVERAGE.
Differential Revision: https://reviews.llvm.org/D35220
Added:
cfe/trunk/test/Import/direct/
- copied from r307452, cfe/trunk/test/Import/member-in-struct/
Modified:
cfe/trunk/include/clang/AST/ExternalASTMerger.h
cfe/trunk/lib/AST/ExternalASTMerger.cpp
cfe/trunk/test/Import/direct/test.c
Modified: cfe/trunk/include/clang/AST/ExternalASTMerger.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ExternalASTMerger.h?rev=307600&r1=307599&r2=307600&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/ExternalASTMerger.h (original)
+++ cfe/trunk/include/clang/AST/ExternalASTMerger.h Mon Jul 10 16:47:00 2017
@@ -44,10 +44,6 @@ public:
FindExternalLexicalDecls(const DeclContext *DC,
llvm::function_ref<bool(Decl::Kind)> IsKindWeWant,
SmallVectorImpl<Decl *> &Result) override;
-
- using ExternalASTSource::CompleteType;
-
- void CompleteType(TagDecl *Tag) override;
};
} // end namespace clang
Modified: cfe/trunk/lib/AST/ExternalASTMerger.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ExternalASTMerger.cpp?rev=307600&r1=307599&r2=307600&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ExternalASTMerger.cpp (original)
+++ cfe/trunk/lib/AST/ExternalASTMerger.cpp Mon Jul 10 16:47:00 2017
@@ -180,8 +180,3 @@ void ExternalASTMerger::FindExternalLexi
});
}
-void ExternalASTMerger::CompleteType(TagDecl *Tag) {
- SmallVector<Decl *, 0> Result;
- FindExternalLexicalDecls(Tag, [](Decl::Kind) { return true; }, Result);
- Tag->setHasExternalLexicalStorage(false);
-}
Modified: cfe/trunk/test/Import/direct/test.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Import/direct/test.c?rev=307600&r1=307452&r2=307600&view=diff
==============================================================================
--- cfe/trunk/test/Import/direct/test.c (original)
+++ cfe/trunk/test/Import/direct/test.c Mon Jul 10 16:47:00 2017
@@ -1,4 +1,4 @@
-// RUN: clang-import-test -import %S/Inputs/S.c -expression %s
+// RUN: clang-import-test -direct -import %S/Inputs/S.c -expression %s
void expr() {
struct S MyS;
MyS.a = 3;
More information about the cfe-commits
mailing list