Skip to content

Commit

Permalink
Stash interim splice
Browse files Browse the repository at this point in the history
  • Loading branch information
zebullon committed Oct 27, 2024
1 parent f168b8d commit 6c0379c
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions clang/lib/Parse/ParseDeclCXX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5059,6 +5059,10 @@ bool Parser::tryParseSpliceAttrSpecifier(ParsedAttributes &Attrs,
if (!Tok.is(tok::annot_splice)) {
return true;
}
Diag(Tok.getLocation(), diag::p3385_trace_execution_checkpoint)
<< "Found splice in attribute expression";
SourceLocation loc = (Tok.getLocation());
SourceRange range(loc);
ExprResult Result = getExprAnnotation(Tok);
ConsumeAnnotationToken();

Expand All @@ -5073,15 +5077,12 @@ bool Parser::tryParseSpliceAttrSpecifier(ParsedAttributes &Attrs,
switch (ER.Val.getReflectionKind()) {
case ReflectionKind::Attribute: {
auto * attr = ER.Val.getReflectedAttribute();
SourceLocation scopeLoc, attrLoc;
IdentifierInfo *scopeName = nullptr;

Attrs.addNew(
(IdentifierInfo*)(attr->getAttrName()), // FIXME ...Wow...rly ?
SourceRange(scopeLoc.isValid() ? scopeLoc : attrLoc, attrLoc),
scopeName, scopeLoc, nullptr, 0,
getLangOpts().CPlusPlus ? ParsedAttr::Form::CXX11()
: ParsedAttr::Form::C23());
const_cast<IdentifierInfo*>(attr->getAttrName()), // (C) Trust me bro
range,
nullptr, loc, nullptr, 0,
ParsedAttr::Form::CXX11());
break;
}
default:
Expand Down

0 comments on commit 6c0379c

Please sign in to comment.