summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclCXX.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
commitc9c02ed8f499f005b5a8e68f1ecd87401f90daa9 (patch)
tree003b2f568adda31fe1d7fe677e48f2ed126f4dc5 /clang/lib/Sema/SemaDeclCXX.cpp
parent724f825f96ab44280a5864e67e8151a7792e393d (diff)
downloadbcm5719-llvm-c9c02ed8f499f005b5a8e68f1ecd87401f90daa9.tar.gz
bcm5719-llvm-c9c02ed8f499f005b5a8e68f1ecd87401f90daa9.zip
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>. llvm-svn: 73797
Diffstat (limited to 'clang/lib/Sema/SemaDeclCXX.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclCXX.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index fd1cc0406fc..8c547cd1ccf 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/lib/Sema/SemaDeclCXX.cpp
@@ -2031,7 +2031,7 @@ Sema::PerformInitializationByConstructor(QualType ClassType,
// constructors, we'll need to make them appear here.
OverloadCandidateSet::iterator Best;
- switch (BestViableFunction(CandidateSet, Best)) {
+ switch (BestViableFunction(CandidateSet, Loc, Best)) {
case OR_Success:
// We found a constructor. Return it.
return cast<CXXConstructorDecl>(Best->Function);
@@ -2263,7 +2263,7 @@ Sema::CheckReferenceInit(Expr *&Init, QualType DeclType,
}
OverloadCandidateSet::iterator Best;
- switch (BestViableFunction(CandidateSet, Best)) {
+ switch (BestViableFunction(CandidateSet, Init->getLocStart(), Best)) {
case OR_Success:
// This is a direct binding.
BindsDirectly = true;
OpenPOWER on IntegriCloud