diff --git a/clang/lib/Parse/ParseDeclCXX.cpp b/clang/lib/Parse/ParseDeclCXX.cpp index 1f3842005469ddb..acdeaf20b8523d6 100644 --- a/clang/lib/Parse/ParseDeclCXX.cpp +++ b/clang/lib/Parse/ParseDeclCXX.cpp @@ -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(); @@ -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(attr->getAttrName()), // (C) Trust me bro + range, + nullptr, loc, nullptr, 0, + ParsedAttr::Form::CXX11()); break; } default: