Author: Timm Bäder Date: 2023-12-19T10:54:58+01:00 New Revision: c52a46a53b4845c92d60b21e3cf1d979273eb20f
URL: https://github.com/llvm/llvm-project/commit/c52a46a53b4845c92d60b21e3cf1d979273eb20f DIFF: https://github.com/llvm/llvm-project/commit/c52a46a53b4845c92d60b21e3cf1d979273eb20f.diff LOG: [clang][AST][NFC] Remove a local variable The reference could be const, but this is even better. Added: Modified: clang/lib/AST/Decl.cpp Removed: ################################################################################ diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp index f8e6f4efff4ebb..c2ea155679193d 100644 --- a/clang/lib/AST/Decl.cpp +++ b/clang/lib/AST/Decl.cpp @@ -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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits