aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-03-09 22:50:47 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-03-09 22:50:47 +0000
commitb52119637f743680a99710ce5fdb6646da2772af (patch)
treec3c085838f4d3361c2b4f8a52632cd62ff176e25
parent2344cbce571b60627653ec3015125737e5f8c68d (diff)
downloadsrc-b52119637f743680a99710ce5fdb6646da2772af.tar.gz
src-b52119637f743680a99710ce5fdb6646da2772af.zip
Vendor import of clang 4.0.0 release r297347:vendor/clang/clang-release_400-r297347
Notes
Notes: svn path=/vendor/clang/dist/; revision=314977 svn path=/vendor/clang/clang-release_400-r297347/; revision=314978; tag=vendor/clang/clang-release_400-r297347
-rw-r--r--lib/Basic/Version.cpp2
-rw-r--r--lib/Serialization/ASTReaderDecl.cpp4
-rw-r--r--test/PCH/empty-def-fwd-struct.h12
3 files changed, 15 insertions, 3 deletions
diff --git a/lib/Basic/Version.cpp b/lib/Basic/Version.cpp
index b91efeb34c7f..97e75a9cd45e 100644
--- a/lib/Basic/Version.cpp
+++ b/lib/Basic/Version.cpp
@@ -36,7 +36,7 @@ std::string getClangRepositoryPath() {
// If the SVN_REPOSITORY is empty, try to use the SVN keyword. This helps us
// pick up a tag in an SVN export, for example.
- StringRef SVNRepository("$URL: https://llvm.org/svn/llvm-project/cfe/branches/release_40/lib/Basic/Version.cpp $");
+ StringRef SVNRepository("$URL: https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_400/final/lib/Basic/Version.cpp $");
if (URL.empty()) {
URL = SVNRepository.slice(SVNRepository.find(':'),
SVNRepository.find("/lib/Basic"));
diff --git a/lib/Serialization/ASTReaderDecl.cpp b/lib/Serialization/ASTReaderDecl.cpp
index c6919193391b..707a9249dd96 100644
--- a/lib/Serialization/ASTReaderDecl.cpp
+++ b/lib/Serialization/ASTReaderDecl.cpp
@@ -2513,8 +2513,8 @@ static bool isConsumerInterestedIn(ASTContext &Ctx, Decl *D, bool HasBody) {
// An ImportDecl or VarDecl imported from a module will get emitted when
// we import the relevant module.
- if ((isa<ImportDecl>(D) || isa<VarDecl>(D)) && Ctx.DeclMustBeEmitted(D) &&
- D->getImportedOwningModule())
+ if ((isa<ImportDecl>(D) || isa<VarDecl>(D)) && D->getImportedOwningModule() &&
+ Ctx.DeclMustBeEmitted(D))
return false;
if (isa<FileScopeAsmDecl>(D) ||
diff --git a/test/PCH/empty-def-fwd-struct.h b/test/PCH/empty-def-fwd-struct.h
new file mode 100644
index 000000000000..dda9827ac8f4
--- /dev/null
+++ b/test/PCH/empty-def-fwd-struct.h
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -emit-pch -x c++-header %s -std=c++14 -o %t.pch
+// RUN: %clang_cc1 -emit-llvm-only -x c++ /dev/null -std=c++14 -include-pch %t.pch -o %t.o
+struct FVector;
+struct FVector {};
+struct FBox {
+ FVector Min;
+ FBox(int);
+};
+namespace {
+FBox InvalidBoundingBox(0);
+}
+