summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTWriter.cpp
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2013-02-01 08:13:20 +0000
committerNick Lewycky <nicholas@mxc.ca>2013-02-01 08:13:20 +0000
commit9c7eb1d887c16a354fdb5441da2360334d84e74e (patch)
treee05ff4fba50a1809c64723898985ef41c2be5006 /clang/lib/Serialization/ASTWriter.cpp
parent848e1f19605a1769f28f5f08a37999c4043ae33b (diff)
downloadbcm5719-llvm-9c7eb1d887c16a354fdb5441da2360334d84e74e.tar.gz
bcm5719-llvm-9c7eb1d887c16a354fdb5441da2360334d84e74e.zip
Add a new -Wundefined-inline warning for inline functions which are used but not
defined. Fixes PR14993! llvm-svn: 174158
Diffstat (limited to 'clang/lib/Serialization/ASTWriter.cpp')
-rw-r--r--clang/lib/Serialization/ASTWriter.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp
index 8120799c11d..2d975466b50 100644
--- a/clang/lib/Serialization/ASTWriter.cpp
+++ b/clang/lib/Serialization/ASTWriter.cpp
@@ -824,7 +824,7 @@ void ASTWriter::WriteBlockInfoBlock() {
RECORD(OPENCL_EXTENSIONS);
RECORD(DELEGATING_CTORS);
RECORD(KNOWN_NAMESPACES);
- RECORD(UNDEFINED_INTERNALS);
+ RECORD(UNDEFINED_BUT_USED);
RECORD(MODULE_OFFSET_MAP);
RECORD(SOURCE_MANAGER_LINE_TABLE);
RECORD(OBJC_CATEGORIES_MAP);
@@ -3588,15 +3588,15 @@ void ASTWriter::WriteASTCore(Sema &SemaRef,
AddDeclRef(I->first, KnownNamespaces);
}
- // Build a record of all used, undefined objects with internal linkage.
- RecordData UndefinedInternals;
+ // Build a record of all used, undefined objects that require definitions.
+ RecordData UndefinedButUsed;
SmallVector<std::pair<NamedDecl *, SourceLocation>, 16> Undefined;
- SemaRef.getUndefinedInternals(Undefined);
+ SemaRef.getUndefinedButUsed(Undefined);
for (SmallVectorImpl<std::pair<NamedDecl *, SourceLocation> >::iterator
I = Undefined.begin(), E = Undefined.end(); I != E; ++I) {
- AddDeclRef(I->first, UndefinedInternals);
- AddSourceLocation(I->second, UndefinedInternals);
+ AddDeclRef(I->first, UndefinedButUsed);
+ AddSourceLocation(I->second, UndefinedButUsed);
}
// Write the control block
@@ -3814,9 +3814,9 @@ void ASTWriter::WriteASTCore(Sema &SemaRef,
if (!KnownNamespaces.empty())
Stream.EmitRecord(KNOWN_NAMESPACES, KnownNamespaces);
- // Write the undefined internal functions and variables.
- if (!UndefinedInternals.empty())
- Stream.EmitRecord(UNDEFINED_INTERNALS, UndefinedInternals);
+ // Write the undefined internal functions and variables, and inline functions.
+ if (!UndefinedButUsed.empty())
+ Stream.EmitRecord(UNDEFINED_BUT_USED, UndefinedButUsed);
// Write the visible updates to DeclContexts.
for (llvm::SmallPtrSet<const DeclContext *, 16>::iterator
OpenPOWER on IntegriCloud