aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Serialization
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
commitcd0655b17249c4c4908ca91462657f62285017e6 (patch)
treef591e7ddc3ef7fdc95b065a9ae56a34d7b42c906 /include/clang/Serialization
parentbe507b6e72df8ab5e7d8c31eb4453e1bdf5fcfaf (diff)
Add a new -Wundefined-inline warning for inline functions which are used but not
defined. Fixes PR14993! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174158 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Serialization')
-rw-r--r--include/clang/Serialization/ASTBitCodes.h6
-rw-r--r--include/clang/Serialization/ASTReader.h7
2 files changed, 7 insertions, 6 deletions
diff --git a/include/clang/Serialization/ASTBitCodes.h b/include/clang/Serialization/ASTBitCodes.h
index 166434201c..6f76367342 100644
--- a/include/clang/Serialization/ASTBitCodes.h
+++ b/include/clang/Serialization/ASTBitCodes.h
@@ -526,9 +526,9 @@ namespace clang {
/// being deserialized.
MACRO_UPDATES = 48,
- /// \brief Record code for undefined but used internal functions and
- /// variables.
- UNDEFINED_INTERNALS = 49
+ /// \brief Record code for undefined but used functions and variables that
+ /// need a definition in this TU.
+ UNDEFINED_BUT_USED = 49
};
/// \brief Record types used within a source manager block.
diff --git a/include/clang/Serialization/ASTReader.h b/include/clang/Serialization/ASTReader.h
index aa3633b4b3..d3f3466c33 100644
--- a/include/clang/Serialization/ASTReader.h
+++ b/include/clang/Serialization/ASTReader.h
@@ -677,8 +677,9 @@ private:
/// \brief A list of the namespaces we've seen.
SmallVector<uint64_t, 4> KnownNamespaces;
- /// \brief A list of undefined decls with internal linkage.
- SmallVector<uint64_t, 8> UndefinedInternals;
+ /// \brief A list of undefined decls with internal linkage followed by the
+ /// SourceLocation of a matching ODR-use.
+ SmallVector<uint64_t, 8> UndefinedButUsed;
/// \brief A list of modules that were imported by precompiled headers or
/// any other non-module AST file.
@@ -1520,7 +1521,7 @@ public:
virtual void ReadKnownNamespaces(
SmallVectorImpl<NamespaceDecl *> &Namespaces);
- virtual void ReadUndefinedInternals(
+ virtual void ReadUndefinedButUsed(
llvm::DenseMap<NamedDecl *, SourceLocation> &Undefined);
virtual void ReadTentativeDefinitions(