Reverts r183466: "Perform dynamic alignment computations..."

This introduces bugs in TemplateSpecializationTypeLoc's angle bracket
locations.

Regression test follows in a subsequent commit.

llvm-svn: 183513
This commit is contained in:
Manuel Klimek
2013-06-07 11:27:53 +00:00
parent f0ec199448
commit e29ec9680a
8 changed files with 103 additions and 266 deletions

View File

@@ -18,7 +18,6 @@
#include "clang/Sema/ScopeInfo.h"
#include "clang/Sema/SemaInternal.h"
#include "clang/Sema/Template.h"
#include "TypeLocBuilder.h"
using namespace clang;
@@ -464,13 +463,17 @@ Sema::CheckPackExpansion(TypeSourceInfo *Pattern, SourceLocation EllipsisLoc,
EllipsisLoc, NumExpansions);
if (Result.isNull())
return 0;
TypeLocBuilder TLB;
TLB.pushFullCopy(Pattern->getTypeLoc());
PackExpansionTypeLoc TL = TLB.push<PackExpansionTypeLoc>(Result);
TypeSourceInfo *TSResult = Context.CreateTypeSourceInfo(Result);
PackExpansionTypeLoc TL =
TSResult->getTypeLoc().castAs<PackExpansionTypeLoc>();
TL.setEllipsisLoc(EllipsisLoc);
return TLB.getTypeSourceInfo(Context, Result);
// Copy over the source-location information from the type.
memcpy(TL.getNextTypeLoc().getOpaqueData(),
Pattern->getTypeLoc().getOpaqueData(),
Pattern->getTypeLoc().getFullDataSize());
return TSResult;
}
QualType Sema::CheckPackExpansion(QualType Pattern, SourceRange PatternRange,