summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2014-09-18 00:12:09 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2014-09-18 00:12:09 +0000
commitbef6cd8b4325de6d05876260fe7c65442eff018d (patch)
tree7dfbab7802db12fd5bf542239d0490b2e84aa82c /clang/lib/Sema
parentd7e375d4b3da967424244ba98a8681a647741869 (diff)
downloadbcm5719-llvm-bef6cd8b4325de6d05876260fe7c65442eff018d.tar.gz
bcm5719-llvm-bef6cd8b4325de6d05876260fe7c65442eff018d.zip
Skip parens when detecting whether we're instantiating a function declaration.
llvm-svn: 217997
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r--clang/lib/Sema/SemaTemplateInstantiate.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaTemplateInstantiate.cpp b/clang/lib/Sema/SemaTemplateInstantiate.cpp
index 5838f756885..25b2802f029 100644
--- a/clang/lib/Sema/SemaTemplateInstantiate.cpp
+++ b/clang/lib/Sema/SemaTemplateInstantiate.cpp
@@ -1577,8 +1577,8 @@ TypeSourceInfo *Sema::SubstFunctionDeclType(TypeSourceInfo *T,
QualType Result;
- // FIXME: What if the function type is parenthesized?
- if (FunctionProtoTypeLoc Proto = TL.getAs<FunctionProtoTypeLoc>()) {
+ if (FunctionProtoTypeLoc Proto =
+ TL.IgnoreParens().getAs<FunctionProtoTypeLoc>()) {
// Instantiate the type, other than its exception specification. The
// exception specification is instantiated in InitFunctionInstantiation
// once we've built the FunctionDecl.
OpenPOWER on IntegriCloud