/// Language - The language for this linkage specification.
LanguageIDs Language;
- /// LBraceLoc - The source location for the left brace (if valid).
- SourceLocation LBraceLoc;
/// RBraceLoc - The source location for the right brace (if valid).
SourceLocation RBraceLoc;
LinkageSpecDecl(DeclContext *DC, SourceLocation L, LanguageIDs lang,
- SourceLocation LBLoc, SourceLocation RBLoc)
+ SourceLocation RBLoc)
: Decl(LinkageSpec, DC, L), DeclContext(LinkageSpec),
- Language(lang), LBraceLoc(LBLoc), RBraceLoc(RBLoc) { }
+ Language(lang), RBraceLoc(RBLoc) { }
public:
static LinkageSpecDecl *Create(ASTContext &C, DeclContext *DC,
SourceLocation L, LanguageIDs Lang,
- SourceLocation LBraceLoc,
SourceLocation RBraceLoc = SourceLocation());
/// \brief Return the language specified by this linkage specification.
/// \brief Determines whether this linkage specification had braces in
/// its syntactic form.
bool hasBraces() const { return RBraceLoc.isValid(); }
- SourceLocation getLBraceLoc() const { return LBraceLoc; }
SourceLocation getRBraceLoc() const { return RBraceLoc; }
- void setLBraceLoc(SourceLocation L) { LBraceLoc = L; }
void setRBraceLoc(SourceLocation L) { RBraceLoc = L; }
SourceLocation getLocEnd() const {
DeclContext *DC,
SourceLocation L,
LanguageIDs Lang,
- SourceLocation LBraceLoc,
SourceLocation RBraceLoc) {
- return new (C) LinkageSpecDecl(DC, L, Lang, LBraceLoc, RBraceLoc);
+ return new (C) LinkageSpecDecl(DC, L, Lang, RBraceLoc);
}
UsingDirectiveDecl *UsingDirectiveDecl::Create(ASTContext &C, DeclContext *DC,
void ASTDeclReader::VisitLinkageSpecDecl(LinkageSpecDecl *D) {
VisitDecl(D);
D->setLanguage((LinkageSpecDecl::LanguageIDs)Record[Idx++]);
- D->setLBraceLoc(ReadSourceLocation(Record, Idx));
D->setRBraceLoc(ReadSourceLocation(Record, Idx));
}
case DECL_LINKAGE_SPEC:
D = LinkageSpecDecl::Create(*Context, 0, SourceLocation(),
(LinkageSpecDecl::LanguageIDs)0,
- SourceLocation(), SourceLocation());
+ SourceLocation());
break;
case DECL_LABEL:
D = LabelDecl::Create(*Context, 0, SourceLocation(), 0);
void ASTDeclWriter::VisitLinkageSpecDecl(LinkageSpecDecl *D) {
VisitDecl(D);
Record.push_back(D->getLanguage());
- Writer.AddSourceLocation(D->getLBraceLoc(), Record);
Writer.AddSourceLocation(D->getRBraceLoc(), Record);
Code = serialization::DECL_LINKAGE_SPEC;
}