Skip to content

Commit

Permalink
Avoid cdecl which is a Microsoft extension.
Browse files Browse the repository at this point in the history
Summary: See https://learn.microsoft.com/en-us/cpp/cpp/cdecl?view=msvc-170

Reviewed By: malanka

Differential Revision: D55515302

fbshipit-source-id: c23c6892da89bec5846c9bad8d3f84c4fd91479f
  • Loading branch information
mpark authored and facebook-github-bot committed Apr 12, 2024
1 parent 6eab781 commit 0a49785
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions glean/lang/clang/ast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -870,14 +870,14 @@ struct ASTVisitor : public clang::RecursiveASTVisitor<ASTVisitor> {

template<typename Memo, typename Decl>
void visitDeclaration(Memo& memo, const Decl *decl) {
if (auto cdecl = memo(decl)) {
decl = cdecl->key;
if (auto mdecl = memo(decl)) {
decl = mdecl->key;
if (DeclTraits::isDefinition(decl)) {
cdecl->define(*this, decl);
mdecl->define(*this, decl);
}
auto same = representative(memo, decl, cdecl.value());
auto same = representative(memo, decl, mdecl.value());
if (same) {
const auto this_decl = cdecl->declaration();
const auto this_decl = mdecl->declaration();
const auto other_decl = same->declaration();
if (this_decl != other_decl) {
db.fact<Cxx::Same>(this_decl, other_decl);
Expand Down

0 comments on commit 0a49785

Please sign in to comment.