aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/PCHReaderDecl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-06-19 23:52:42 +0000
committerDouglas Gregor <dgregor@apple.com>2009-06-19 23:52:42 +0000
commite0762c92110dfdcdd207db461a4ea17afd168f1e (patch)
treeca454873887ffee6570e846ff9e56289360f18f2 /lib/Frontend/PCHReaderDecl.cpp
parent7d5c74ecbbd8719436c071f38657bc8e97ee4a24 (diff)
Keep track of when declarations are "used" according to C and
C++. This logic is required to trigger implicit instantiation of function templates and member functions of class templates, which will be implemented separately. This commit includes support for -Wunused-parameter, printing warnings for named parameters that are not used within a function/Objective-C method/block. Fixes <rdar://problem/6505209>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73797 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/PCHReaderDecl.cpp')
-rw-r--r--lib/Frontend/PCHReaderDecl.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Frontend/PCHReaderDecl.cpp b/lib/Frontend/PCHReaderDecl.cpp
index 7c477560c6..27a0869632 100644
--- a/lib/Frontend/PCHReaderDecl.cpp
+++ b/lib/Frontend/PCHReaderDecl.cpp
@@ -82,6 +82,7 @@ void PCHDeclReader::VisitDecl(Decl *D) {
if (Record[Idx++])
D->addAttr(*Reader.getContext(), Reader.ReadAttributes());
D->setImplicit(Record[Idx++]);
+ D->setUsed(Record[Idx++]);
D->setAccess((AccessSpecifier)Record[Idx++]);
}