[clang] Add clang atomic control options and attribute (PR #114841)
Yaxun Liu via cfe-commits
cfe-commits at lists.llvm.org
Sun Feb 23 17:00:54 PST 2025
================
@@ -625,6 +625,43 @@ static Attr *handleHLSLControlFlowHint(Sema &S, Stmt *St, const ParsedAttr &A,
return ::new (S.Context) HLSLControlFlowHintAttr(S.Context, A);
}
+static Attr *handleAtomicAttr(Sema &S, Stmt *St, const ParsedAttr &A,
+ SourceRange Range) {
+ if (!isa<CompoundStmt>(St)) {
----------------
yxsamliu wrote:
Yes we still need this. The infrastructure from Attr.td parses the attribute and creates ParsedAttr. The AtomicAttr in AST still needs to be created in Sema by this handler. However, we could avoid the specific parsing function for AtomicAttr in ParseDecl.cpp
https://github.com/llvm/llvm-project/pull/114841
More information about the cfe-commits
mailing list