Skip to content

Commit

Permalink
[clang][AST][NFC] Remove a local variable
Browse files Browse the repository at this point in the history
The reference could be const, but this is even better.
  • Loading branch information
tbaederr committed Dec 19, 2023
1 parent 9348d43 commit c52a46a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions clang/lib/AST/Decl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2200,8 +2200,7 @@ static LanguageLinkage getDeclLanguageLinkage(const T &D) {

// Language linkage is a C++ concept, but saying that everything else in C has
// C language linkage fits the implementation nicely.
ASTContext &Context = D.getASTContext();
if (!Context.getLangOpts().CPlusPlus)
if (!D.getASTContext().getLangOpts().CPlusPlus)
return CLanguageLinkage;

// C++ [dcl.link]p4: A C language linkage is ignored in determining the
Expand Down

0 comments on commit c52a46a

Please sign in to comment.