Changeset View
Changeset View
Standalone View
Standalone View
clang/include/clang/Parse/Parser.h
Show First 20 Lines • Show All 2,808 Lines • ▼ Show 20 Lines | bool ParseCXX11AttributeArgs(IdentifierInfo *AttrName, | ||||
SourceLocation ScopeLoc, | SourceLocation ScopeLoc, | ||||
CachedTokens &OpenMPTokens); | CachedTokens &OpenMPTokens); | ||||
IdentifierInfo *TryParseCXX11AttributeIdentifier( | IdentifierInfo *TryParseCXX11AttributeIdentifier( | ||||
SourceLocation &Loc, | SourceLocation &Loc, | ||||
Sema::AttributeCompletion Completion = Sema::AttributeCompletion::None, | Sema::AttributeCompletion Completion = Sema::AttributeCompletion::None, | ||||
const IdentifierInfo *EnclosingScope = nullptr); | const IdentifierInfo *EnclosingScope = nullptr); | ||||
void MaybeParseHLSLSemantics(Declarator &D, | |||||
SourceLocation *EndLoc = nullptr) { | |||||
aaron.ballman: Let's assert we're in HLSL mode here so that we don't accidentally call this from non-HLSL… | |||||
aaron.ballmanUnsubmitted Precommit CI finds a way to trigger this assert, so it looks like we caught a case we didn't know about (yay asserts!). aaron.ballman: Precommit CI finds a way to trigger this assert, so it looks like we caught a case we didn't… | |||||
python3kgaeAuthorUnsubmitted Yeah. Pre-commit CI is really cool. :) It would be nice if there's an optional config so we can let it test experimental targets too. python3kgae: Yeah. Pre-commit CI is really cool. :)
It would be nice if there's an optional config so we… | |||||
if (Tok.is(tok::colon)) { | |||||
ParsedAttributes Attrs(AttrFactory); | |||||
ParseHLSLSemantics(Attrs, EndLoc); | |||||
D.takeAttributes(Attrs); | |||||
} | |||||
} | |||||
void MaybeParseHLSLSemantics(ParsedAttributes &Attrs, | void MaybeParseHLSLSemantics(ParsedAttributes &Attrs, | ||||
SourceLocation *EndLoc = nullptr) { | SourceLocation *EndLoc = nullptr) { | ||||
if (getLangOpts().HLSL && Tok.is(tok::colon)) | if (getLangOpts().HLSL && Tok.is(tok::colon)) | ||||
ParseHLSLSemantics(Attrs, EndLoc); | ParseHLSLSemantics(Attrs, EndLoc); | ||||
} | } | ||||
void ParseHLSLSemantics(ParsedAttributes &Attrs, | void ParseHLSLSemantics(ParsedAttributes &Attrs, | ||||
SourceLocation *EndLoc = nullptr); | SourceLocation *EndLoc = nullptr); | ||||
▲ Show 20 Lines • Show All 690 Lines • Show Last 20 Lines |
Let's assert we're in HLSL mode here so that we don't accidentally call this from non-HLSL parsing contexts.