aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/Type.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-12-15 23:18:36 +0000
committerDouglas Gregor <dgregor@apple.com>2010-12-15 23:18:36 +0000
commite186269a8a41dbff1ebea2c251048892979d1078 (patch)
treecfb98507042508e78bcd362f08456fe2c7e1f342 /lib/AST/Type.cpp
parentc11e1d7f1eff113b8a4b2a6370975eb1dc7c9205 (diff)
Check for unexpanded parameter packs in various kinds of
declarations. This is a work in progress, as I go through the C++ declaration grammar to identify where unexpanded parameter packs can occur. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121912 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Type.cpp')
-rw-r--r--lib/AST/Type.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp
index 0991e5a709..9dbbfaa733 100644
--- a/lib/AST/Type.cpp
+++ b/lib/AST/Type.cpp
@@ -1123,8 +1123,15 @@ FunctionProtoType::FunctionProtoType(QualType result, const QualType *args,
// Fill in the exception array.
QualType *exnSlot = argSlot + numArgs;
- for (unsigned i = 0, e = epi.NumExceptions; i != e; ++i)
+ for (unsigned i = 0, e = epi.NumExceptions; i != e; ++i) {
+ if (epi.Exceptions[i]->isDependentType())
+ setDependent();
+
+ if (epi.Exceptions[i]->containsUnexpandedParameterPack())
+ setContainsUnexpandedParameterPack();
+
exnSlot[i] = epi.Exceptions[i];
+ }
}