File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ using ResolvedDecl =
7575ResolvedDecl getResolvedDecl (clang::ASTContext &ctx, const clang::Expr *expr,
7676 bool must_resolve) {
7777 expr = RuleDecls::SkipImplicit (expr);
78- if (llvm::isa<clang::IntegerLiteral>(expr) &&
78+ if (llvm::isa<clang::IntegerLiteral, clang::AtomicExpr >(expr) &&
7979 expr->getBeginLoc ().isMacroID ()) {
8080 return MacroUsage{
8181 clang::Lexer::getImmediateMacroName (
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ std::optional<ExprKey> getDeclKey(const clang::NamedDecl *decl) {
120120std::optional<ExprKey> getExprKey (clang::ASTContext &ctx,
121121 const clang::Expr *expr) {
122122 expr = RuleDecls::SkipImplicit (expr);
123- if (llvm::isa<clang::IntegerLiteral>(expr) &&
123+ if (llvm::isa<clang::IntegerLiteral, clang::AtomicExpr >(expr) &&
124124 expr->getBeginLoc ().isMacroID ()) {
125125 auto macro = clang::Lexer::getImmediateMacroName (
126126 expr->getBeginLoc (), ctx.getSourceManager (), ctx.getLangOpts ());
Original file line number Diff line number Diff line change @@ -474,7 +474,7 @@ std::string DeclKey(const clang::NamedDecl *decl) {
474474
475475std::string ExprKey (clang::ASTContext &ctx, const clang::Expr *expr) {
476476 expr = expr->IgnoreParenImpCasts ();
477- if (llvm::isa<clang::IntegerLiteral>(expr) &&
477+ if (llvm::isa<clang::IntegerLiteral, clang::AtomicExpr >(expr) &&
478478 expr->getBeginLoc ().isMacroID ()) {
479479 return clang::Lexer::getImmediateMacroName (
480480 expr->getBeginLoc (), ctx.getSourceManager (), ctx.getLangOpts ())
Original file line number Diff line number Diff line change 1+ // Copyright (c) 2022-present INESC-ID.
2+ // Distributed under the MIT license that can be found in the LICENSE file.
3+
4+ #include <stdatomic.h>
5+
6+ void f1 (volatile atomic_flag * a0 ) { return atomic_flag_clear (a0 ); }
Original file line number Diff line number Diff line change 1+ // Copyright (c) 2022-present INESC-ID.
2+ // Distributed under the MIT license that can be found in the LICENSE file.
3+
4+ unsafe fn f1 ( a0 : * mut :: std:: sync:: atomic:: AtomicBool ) {
5+ ( * a0) . store ( false , :: std:: sync:: atomic:: Ordering :: SeqCst )
6+ }
You can’t perform that action at this time.
0 commit comments