diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-04-01 18:32:35 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-04-01 18:32:35 +0000 |
commit | b7a09260204f2079e0f998bf7ee52b95122a4c5d (patch) | |
tree | 4e8b09d886533551e6ddeea421282d59888cf5a0 /lib/Sema/SemaOverload.cpp | |
parent | 5d93ed3c7a2dae0a8f422747e269963b3ef11d95 (diff) |
Overhaul checking of non-type template arguments that should refer to
an object or function. Our previous checking was too lax, and ended up
allowing missing or extraneous address-of operators, among other
evils. The new checking provides better diagnostics and adheres more
closely to the standard.
Fixes PR6563 and PR6749.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100125 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaOverload.cpp')
-rw-r--r-- | lib/Sema/SemaOverload.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index be367c3660..bc10a58d6b 100644 --- a/lib/Sema/SemaOverload.cpp +++ b/lib/Sema/SemaOverload.cpp @@ -4991,6 +4991,8 @@ Sema::ResolveAddressOfOverloadedFunction(Expr *From, QualType ToType, // Look through all of the overloaded functions, searching for one // whose type matches exactly. llvm::SmallVector<std::pair<DeclAccessPair, FunctionDecl*>, 4> Matches; + llvm::SmallVector<FunctionDecl *, 4> NonMatches; + bool FoundNonTemplateFunction = false; for (UnresolvedSetIterator I = OvlExpr->decls_begin(), E = OvlExpr->decls_end(); I != E; ++I) { |