summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/instantiate-method.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-04-12 07:48:19 +0000
committerDouglas Gregor <dgregor@apple.com>2010-04-12 07:48:19 +0000
commit940bca7b93ef664533f3277c9f342c5fd6615a57 (patch)
treeeeac968b1ab0e3a313273d11ab402464b6ea9e65 /clang/test/SemaTemplate/instantiate-method.cpp
parentf76210ead802a3fc69308466f1f04bb3d061f504 (diff)
downloadbcm5719-llvm-940bca7b93ef664533f3277c9f342c5fd6615a57.tar.gz
bcm5719-llvm-940bca7b93ef664533f3277c9f342c5fd6615a57.zip
Be sure to instantiate the parameters of a function, even when the
function's type is (strictly speaking) non-dependent. This ensures that, e.g., default function arguments get instantiated properly. And, since I couldn't resist, collapse the two implementations of function-parameter instantiation into calls to a single, new function (Sema::SubstParmVarDecl), since the two had nearly identical code (and each had bugs the other didn't!). More importantly, factored out the semantic analysis of a parameter declaration into Sema::CheckParameter, which is called both by Sema::ActOnParamDeclarator (when parameters are parsed) and when a parameter is instantiated. Previously, we were missing some Objective-C and address-space checks on instantiated function parameters. Fixes PR6733. llvm-svn: 101029
Diffstat (limited to 'clang/test/SemaTemplate/instantiate-method.cpp')
-rw-r--r--clang/test/SemaTemplate/instantiate-method.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/SemaTemplate/instantiate-method.cpp b/clang/test/SemaTemplate/instantiate-method.cpp
index 357ea261775..635d839b2bd 100644
--- a/clang/test/SemaTemplate/instantiate-method.cpp
+++ b/clang/test/SemaTemplate/instantiate-method.cpp
@@ -5,7 +5,7 @@ public:
void f(T x); // expected-error{{argument may not have 'void' type}}
void g(T*);
- static int h(T, T); // expected-error 2{{argument may not have 'void' type}}
+ static int h(T, T); // expected-error {{argument may not have 'void' type}}
};
int identity(int x) { return x; }
OpenPOWER on IntegriCloud