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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user