diff options
author | David Blaikie <dblaikie@gmail.com> | 2013-07-13 21:08:08 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2013-07-13 21:08:08 +0000 |
commit | 226399ce18cdcbb1e83af7c5e644bdabb9d4f2f8 (patch) | |
tree | 255311d521a4577e0a01dbd94f940d9f7cffb0f9 /include/clang/AST/Type.h | |
parent | dc80978ed59863c4d4eb251c109d312de0532611 (diff) | |
download | clang-226399ce18cdcbb1e83af7c5e644bdabb9d4f2f8.tar.gz |
Correctly classify pack expansions as NON_CANONICAL_UNLESS_DEPENDENT
Test coverage for non-dependent pack expansions doesn't demonstrate a
failure prior to this patch (a follow-up commit improving debug info
will cover this commit specifically) but covers a related hole in our
test coverage.
Reviewed by Richard Smith & Eli Friedman.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186261 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/AST/Type.h')
-rw-r--r-- | include/clang/AST/Type.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/clang/AST/Type.h b/include/clang/AST/Type.h index 1133d126c3..562243c123 100644 --- a/include/clang/AST/Type.h +++ b/include/clang/AST/Type.h @@ -4202,8 +4202,8 @@ public: return None; } - bool isSugared() const { return false; } - QualType desugar() const { return QualType(this, 0); } + bool isSugared() const { return !Pattern->isDependentType(); } + QualType desugar() const { return isSugared() ? Pattern : QualType(this, 0); } void Profile(llvm::FoldingSetNodeID &ID) { Profile(ID, getPattern(), getNumExpansions()); |