Skip to content

Commit 019a2b2

Browse files
SC llvm teamSC llvm team
authored andcommitted
Merged main:e3c2eacfd8b9 into amd-gfx:f98ed7f135e5
Local branch amd-gfx f98ed7f Merged main:47d9fbc04b91 into amd-gfx:d315d30c5fe7 Remote branch main e3c2eac [libc++] <experimental/simd> Add default constructor for class simd/simd_mask (llvm#70424)
2 parents f98ed7f + e3c2eac commit 019a2b2

File tree

74 files changed

+2428
-612
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+2428
-612
lines changed

clang-tools-extra/clang-tidy/modernize/DeprecatedHeadersCheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class ExternCRefutationVisitor
5757
bool shouldVisitLambdaBody() const { return false; }
5858

5959
bool VisitLinkageSpecDecl(LinkageSpecDecl *LinkSpecDecl) const {
60-
if (LinkSpecDecl->getLanguage() != LinkageSpecDecl::lang_c ||
60+
if (LinkSpecDecl->getLanguage() != LinkageSpecLanguageIDs::C ||
6161
!LinkSpecDecl->hasBraces())
6262
return true;
6363

clang-tools-extra/modularize/Modularize.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,10 +574,10 @@ class CollectEntitiesVisitor
574574
SourceRange BlockRange = D->getSourceRange();
575575
const char *LinkageLabel;
576576
switch (D->getLanguage()) {
577-
case LinkageSpecDecl::lang_c:
577+
case LinkageSpecLanguageIDs::C:
578578
LinkageLabel = "extern \"C\" {}";
579579
break;
580-
case LinkageSpecDecl::lang_cxx:
580+
case LinkageSpecLanguageIDs::CXX:
581581
LinkageLabel = "extern \"C++\" {}";
582582
break;
583583
}

clang/docs/ReleaseNotes.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,14 @@ Improvements to Clang's diagnostics
427427
(or, more commonly, ``NULL`` when the platform defines it as ``__null``) to be more consistent
428428
with GCC.
429429

430+
Improvements to Clang's time-trace
431+
----------------------------------
432+
- Two time-trace scope variables are added. A time trace scope variable of
433+
``ParseDeclarationOrFunctionDefinition`` with the function's source location
434+
is added to record the time spent parsing the function's declaration or
435+
definition. Another time trace scope variable of ``ParseFunctionDefinition``
436+
is also added to record the name of the defined function.
437+
430438
Bug Fixes in This Version
431439
-------------------------
432440
- Fixed an issue where a class template specialization whose declaration is
@@ -674,6 +682,10 @@ Bug Fixes to C++ Support
674682
Fixes:
675683
(`#68769 <https://github.com/llvm/llvm-project/issues/68769>`_)
676684

685+
- Clang now defers the instantiation of explicit specifier until constraint checking
686+
completes (except deduction guides). Fixes:
687+
(`#59827 <https://github.com/llvm/llvm-project/issues/59827>`_)
688+
677689
Bug Fixes to AST Handling
678690
^^^^^^^^^^^^^^^^^^^^^^^^^
679691
- Fixed an import failure of recursive friend class template.

clang/include/clang/AST/DeclBase.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1430,6 +1430,8 @@ enum class OMPDeclareReductionInitKind {
14301430

14311431
enum class ObjCImplementationControl { None, Required, Optional };
14321432

1433+
enum class LinkageSpecLanguageIDs;
1434+
14331435
/// DeclContext - This is used only as base class of specific decl types that
14341436
/// can act as declaration contexts. These decls are (only the top classes
14351437
/// that directly derive from DeclContext are mentioned, not their subclasses):

clang/include/clang/AST/DeclCXX.h

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2897,6 +2897,12 @@ class CXXConversionDecl : public CXXMethodDecl {
28972897
static bool classofKind(Kind K) { return K == CXXConversion; }
28982898
};
28992899

2900+
/// Represents the language in a linkage specification.
2901+
///
2902+
/// The values are part of the serialization ABI for
2903+
/// ASTs and cannot be changed without altering that ABI.
2904+
enum class LinkageSpecLanguageIDs { C = 1, CXX = 2 };
2905+
29002906
/// Represents a linkage specification.
29012907
///
29022908
/// For example:
@@ -2907,37 +2913,33 @@ class LinkageSpecDecl : public Decl, public DeclContext {
29072913
virtual void anchor();
29082914
// This class stores some data in DeclContext::LinkageSpecDeclBits to save
29092915
// some space. Use the provided accessors to access it.
2910-
public:
2911-
/// Represents the language in a linkage specification.
2912-
///
2913-
/// The values are part of the serialization ABI for
2914-
/// ASTs and cannot be changed without altering that ABI.
2915-
enum LanguageIDs { lang_c = 1, lang_cxx = 2 };
29162916

2917-
private:
29182917
/// The source location for the extern keyword.
29192918
SourceLocation ExternLoc;
29202919

29212920
/// The source location for the right brace (if valid).
29222921
SourceLocation RBraceLoc;
29232922

29242923
LinkageSpecDecl(DeclContext *DC, SourceLocation ExternLoc,
2925-
SourceLocation LangLoc, LanguageIDs lang, bool HasBraces);
2924+
SourceLocation LangLoc, LinkageSpecLanguageIDs lang,
2925+
bool HasBraces);
29262926

29272927
public:
29282928
static LinkageSpecDecl *Create(ASTContext &C, DeclContext *DC,
29292929
SourceLocation ExternLoc,
2930-
SourceLocation LangLoc, LanguageIDs Lang,
2931-
bool HasBraces);
2930+
SourceLocation LangLoc,
2931+
LinkageSpecLanguageIDs Lang, bool HasBraces);
29322932
static LinkageSpecDecl *CreateDeserialized(ASTContext &C, unsigned ID);
29332933

29342934
/// Return the language specified by this linkage specification.
2935-
LanguageIDs getLanguage() const {
2936-
return static_cast<LanguageIDs>(LinkageSpecDeclBits.Language);
2935+
LinkageSpecLanguageIDs getLanguage() const {
2936+
return static_cast<LinkageSpecLanguageIDs>(LinkageSpecDeclBits.Language);
29372937
}
29382938

29392939
/// Set the language specified by this linkage specification.
2940-
void setLanguage(LanguageIDs L) { LinkageSpecDeclBits.Language = L; }
2940+
void setLanguage(LinkageSpecLanguageIDs L) {
2941+
LinkageSpecDeclBits.Language = llvm::to_underlying(L);
2942+
}
29412943

29422944
/// Determines whether this linkage specification had braces in
29432945
/// its syntactic form.

clang/include/clang/Sema/Sema.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10430,6 +10430,9 @@ class Sema final {
1043010430
const CXXConstructorDecl *Tmpl,
1043110431
const MultiLevelTemplateArgumentList &TemplateArgs);
1043210432

10433+
ExplicitSpecifier instantiateExplicitSpecifier(
10434+
const MultiLevelTemplateArgumentList &TemplateArgs, ExplicitSpecifier ES);
10435+
1043310436
NamedDecl *FindInstantiatedDecl(SourceLocation Loc, NamedDecl *D,
1043410437
const MultiLevelTemplateArgumentList &TemplateArgs,
1043510438
bool FindingInstantiatedContext = false);

clang/lib/AST/DeclBase.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1320,7 +1320,7 @@ bool DeclContext::isTransparentContext() const {
13201320
}
13211321

13221322
static bool isLinkageSpecContext(const DeclContext *DC,
1323-
LinkageSpecDecl::LanguageIDs ID) {
1323+
LinkageSpecLanguageIDs ID) {
13241324
while (DC->getDeclKind() != Decl::TranslationUnit) {
13251325
if (DC->getDeclKind() == Decl::LinkageSpec)
13261326
return cast<LinkageSpecDecl>(DC)->getLanguage() == ID;
@@ -1330,22 +1330,22 @@ static bool isLinkageSpecContext(const DeclContext *DC,
13301330
}
13311331

13321332
bool DeclContext::isExternCContext() const {
1333-
return isLinkageSpecContext(this, LinkageSpecDecl::lang_c);
1333+
return isLinkageSpecContext(this, LinkageSpecLanguageIDs::C);
13341334
}
13351335

13361336
const LinkageSpecDecl *DeclContext::getExternCContext() const {
13371337
const DeclContext *DC = this;
13381338
while (DC->getDeclKind() != Decl::TranslationUnit) {
13391339
if (DC->getDeclKind() == Decl::LinkageSpec &&
1340-
cast<LinkageSpecDecl>(DC)->getLanguage() == LinkageSpecDecl::lang_c)
1340+
cast<LinkageSpecDecl>(DC)->getLanguage() == LinkageSpecLanguageIDs::C)
13411341
return cast<LinkageSpecDecl>(DC);
13421342
DC = DC->getLexicalParent();
13431343
}
13441344
return nullptr;
13451345
}
13461346

13471347
bool DeclContext::isExternCXXContext() const {
1348-
return isLinkageSpecContext(this, LinkageSpecDecl::lang_cxx);
1348+
return isLinkageSpecContext(this, LinkageSpecLanguageIDs::CXX);
13491349
}
13501350

13511351
bool DeclContext::Encloses(const DeclContext *DC) const {

clang/lib/AST/DeclCXX.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2854,8 +2854,8 @@ bool CXXConversionDecl::isLambdaToBlockPointerConversion() const {
28542854
}
28552855

28562856
LinkageSpecDecl::LinkageSpecDecl(DeclContext *DC, SourceLocation ExternLoc,
2857-
SourceLocation LangLoc, LanguageIDs lang,
2858-
bool HasBraces)
2857+
SourceLocation LangLoc,
2858+
LinkageSpecLanguageIDs lang, bool HasBraces)
28592859
: Decl(LinkageSpec, DC, LangLoc), DeclContext(LinkageSpec),
28602860
ExternLoc(ExternLoc), RBraceLoc(SourceLocation()) {
28612861
setLanguage(lang);
@@ -2864,19 +2864,19 @@ LinkageSpecDecl::LinkageSpecDecl(DeclContext *DC, SourceLocation ExternLoc,
28642864

28652865
void LinkageSpecDecl::anchor() {}
28662866

2867-
LinkageSpecDecl *LinkageSpecDecl::Create(ASTContext &C,
2868-
DeclContext *DC,
2867+
LinkageSpecDecl *LinkageSpecDecl::Create(ASTContext &C, DeclContext *DC,
28692868
SourceLocation ExternLoc,
28702869
SourceLocation LangLoc,
2871-
LanguageIDs Lang,
2870+
LinkageSpecLanguageIDs Lang,
28722871
bool HasBraces) {
28732872
return new (C, DC) LinkageSpecDecl(DC, ExternLoc, LangLoc, Lang, HasBraces);
28742873
}
28752874

28762875
LinkageSpecDecl *LinkageSpecDecl::CreateDeserialized(ASTContext &C,
28772876
unsigned ID) {
2878-
return new (C, ID) LinkageSpecDecl(nullptr, SourceLocation(),
2879-
SourceLocation(), lang_c, false);
2877+
return new (C, ID)
2878+
LinkageSpecDecl(nullptr, SourceLocation(), SourceLocation(),
2879+
LinkageSpecLanguageIDs::C, false);
28802880
}
28812881

28822882
void UsingDirectiveDecl::anchor() {}

clang/lib/AST/DeclPrinter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,10 +1194,10 @@ void DeclPrinter::VisitCXXRecordDecl(CXXRecordDecl *D) {
11941194

11951195
void DeclPrinter::VisitLinkageSpecDecl(LinkageSpecDecl *D) {
11961196
const char *l;
1197-
if (D->getLanguage() == LinkageSpecDecl::lang_c)
1197+
if (D->getLanguage() == LinkageSpecLanguageIDs::C)
11981198
l = "C";
11991199
else {
1200-
assert(D->getLanguage() == LinkageSpecDecl::lang_cxx &&
1200+
assert(D->getLanguage() == LinkageSpecLanguageIDs::CXX &&
12011201
"unknown language in linkage specification");
12021202
l = "C++";
12031203
}

clang/lib/AST/JSONNodeDumper.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,8 +1027,12 @@ void JSONNodeDumper::VisitTemplateTemplateParmDecl(
10271027
void JSONNodeDumper::VisitLinkageSpecDecl(const LinkageSpecDecl *LSD) {
10281028
StringRef Lang;
10291029
switch (LSD->getLanguage()) {
1030-
case LinkageSpecDecl::lang_c: Lang = "C"; break;
1031-
case LinkageSpecDecl::lang_cxx: Lang = "C++"; break;
1030+
case LinkageSpecLanguageIDs::C:
1031+
Lang = "C";
1032+
break;
1033+
case LinkageSpecLanguageIDs::CXX:
1034+
Lang = "C++";
1035+
break;
10321036
}
10331037
JOS.attribute("language", Lang);
10341038
attributeOnlyIfTrue("hasBraces", LSD->hasBraces());

clang/lib/AST/TextNodeDumper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2413,10 +2413,10 @@ void TextNodeDumper::VisitConstructorUsingShadowDecl(
24132413

24142414
void TextNodeDumper::VisitLinkageSpecDecl(const LinkageSpecDecl *D) {
24152415
switch (D->getLanguage()) {
2416-
case LinkageSpecDecl::lang_c:
2416+
case LinkageSpecLanguageIDs::C:
24172417
OS << " C";
24182418
break;
2419-
case LinkageSpecDecl::lang_cxx:
2419+
case LinkageSpecLanguageIDs::CXX:
24202420
OS << " C++";
24212421
break;
24222422
}

clang/lib/CodeGen/CGBuiltin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5049,7 +5049,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
50495049
case Builtin::BI__GetExceptionInfo: {
50505050
if (llvm::GlobalVariable *GV =
50515051
CGM.getCXXABI().getThrowInfo(FD->getParamDecl(0)->getType()))
5052-
return RValue::get(llvm::ConstantExpr::getBitCast(GV, CGM.Int8PtrTy));
5052+
return RValue::get(GV);
50535053
break;
50545054
}
50555055

clang/lib/CodeGen/CGDecl.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,9 +386,7 @@ CodeGenFunction::AddInitializerToStaticVarDecl(const VarDecl &D,
386386
GV->takeName(OldGV);
387387

388388
// Replace all uses of the old global with the new global
389-
llvm::Constant *NewPtrForOldDecl =
390-
llvm::ConstantExpr::getBitCast(GV, OldGV->getType());
391-
OldGV->replaceAllUsesWith(NewPtrForOldDecl);
389+
OldGV->replaceAllUsesWith(GV);
392390

393391
// Erase the old global, since it is no longer used.
394392
OldGV->eraseFromParent();

clang/lib/CodeGen/CodeGenModule.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6514,8 +6514,8 @@ void CodeGenModule::EmitObjCIvarInitializations(ObjCImplementationDecl *D) {
65146514

65156515
// EmitLinkageSpec - Emit all declarations in a linkage spec.
65166516
void CodeGenModule::EmitLinkageSpec(const LinkageSpecDecl *LSD) {
6517-
if (LSD->getLanguage() != LinkageSpecDecl::lang_c &&
6518-
LSD->getLanguage() != LinkageSpecDecl::lang_cxx) {
6517+
if (LSD->getLanguage() != LinkageSpecLanguageIDs::C &&
6518+
LSD->getLanguage() != LinkageSpecLanguageIDs::CXX) {
65196519
ErrorUnsupported(LSD, "linkage spec");
65206520
return;
65216521
}

clang/lib/CodeGen/CodeGenPGO.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -960,9 +960,8 @@ void CodeGenPGO::emitCounterIncrement(CGBuilderTy &Builder, const Stmt *S,
960960
return;
961961

962962
unsigned Counter = (*RegionCounterMap)[S];
963-
auto *I8PtrTy = llvm::Type::getInt8PtrTy(CGM.getLLVMContext());
964963

965-
llvm::Value *Args[] = {llvm::ConstantExpr::getBitCast(FuncNameVar, I8PtrTy),
964+
llvm::Value *Args[] = {FuncNameVar,
966965
Builder.getInt64(FunctionHash),
967966
Builder.getInt32(NumRegionCounters),
968967
Builder.getInt32(Counter), StepV};
@@ -1000,7 +999,7 @@ void CodeGenPGO::valueProfile(CGBuilderTy &Builder, uint32_t ValueKind,
1000999
auto BuilderInsertPoint = Builder.saveIP();
10011000
Builder.SetInsertPoint(ValueSite);
10021001
llvm::Value *Args[5] = {
1003-
llvm::ConstantExpr::getBitCast(FuncNameVar, Builder.getInt8PtrTy()),
1002+
FuncNameVar,
10041003
Builder.getInt64(FunctionHash),
10051004
Builder.CreatePtrToInt(ValuePtr, Builder.getInt64Ty()),
10061005
Builder.getInt32(ValueKind),

clang/lib/CodeGen/ItaniumCXXABI.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3938,9 +3938,7 @@ llvm::Constant *ItaniumRTTIBuilder::BuildTypeInfo(
39383938
// If there's already an old global variable, replace it with the new one.
39393939
if (OldGV) {
39403940
GV->takeName(OldGV);
3941-
llvm::Constant *NewPtr =
3942-
llvm::ConstantExpr::getBitCast(GV, OldGV->getType());
3943-
OldGV->replaceAllUsesWith(NewPtr);
3941+
OldGV->replaceAllUsesWith(GV);
39443942
OldGV->eraseFromParent();
39453943
}
39463944

clang/lib/Parse/Parser.cpp

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,16 @@
1313
#include "clang/Parse/Parser.h"
1414
#include "clang/AST/ASTConsumer.h"
1515
#include "clang/AST/ASTContext.h"
16-
#include "clang/AST/DeclTemplate.h"
1716
#include "clang/AST/ASTLambda.h"
17+
#include "clang/AST/DeclTemplate.h"
1818
#include "clang/Basic/FileManager.h"
1919
#include "clang/Parse/ParseDiagnostic.h"
2020
#include "clang/Parse/RAIIObjectsForParser.h"
2121
#include "clang/Sema/DeclSpec.h"
2222
#include "clang/Sema/ParsedTemplate.h"
2323
#include "clang/Sema/Scope.h"
2424
#include "llvm/Support/Path.h"
25+
#include "llvm/Support/TimeProfiler.h"
2526
using namespace clang;
2627

2728

@@ -1229,6 +1230,13 @@ Parser::DeclGroupPtrTy Parser::ParseDeclOrFunctionDefInternal(
12291230
Parser::DeclGroupPtrTy Parser::ParseDeclarationOrFunctionDefinition(
12301231
ParsedAttributes &Attrs, ParsedAttributes &DeclSpecAttrs,
12311232
ParsingDeclSpec *DS, AccessSpecifier AS) {
1233+
// Add an enclosing time trace scope for a bunch of small scopes with
1234+
// "EvaluateAsConstExpr".
1235+
llvm::TimeTraceScope TimeScope("ParseDeclarationOrFunctionDefinition", [&]() {
1236+
return Tok.getLocation().printToString(
1237+
Actions.getASTContext().getSourceManager());
1238+
});
1239+
12321240
if (DS) {
12331241
return ParseDeclOrFunctionDefInternal(Attrs, DeclSpecAttrs, *DS, AS);
12341242
} else {
@@ -1259,6 +1267,10 @@ Parser::DeclGroupPtrTy Parser::ParseDeclarationOrFunctionDefinition(
12591267
Decl *Parser::ParseFunctionDefinition(ParsingDeclarator &D,
12601268
const ParsedTemplateInfo &TemplateInfo,
12611269
LateParsedAttrList *LateParsedAttrs) {
1270+
llvm::TimeTraceScope TimeScope("ParseFunctionDefinition", [&]() {
1271+
return Actions.GetNameForDeclarator(D).getName().getAsString();
1272+
});
1273+
12621274
// Poison SEH identifiers so they are flagged as illegal in function bodies.
12631275
PoisonSEHIdentifiersRAIIObject PoisonSEHIdentifiers(*this, true);
12641276
const DeclaratorChunk::FunctionTypeInfo &FTI = D.getFunctionTypeInfo();

clang/lib/Sema/SemaDecl.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2407,7 +2407,7 @@ FunctionDecl *Sema::CreateBuiltin(IdentifierInfo *II, QualType Type,
24072407

24082408
if (getLangOpts().CPlusPlus) {
24092409
LinkageSpecDecl *CLinkageDecl = LinkageSpecDecl::Create(
2410-
Context, Parent, Loc, Loc, LinkageSpecDecl::lang_c, false);
2410+
Context, Parent, Loc, Loc, LinkageSpecLanguageIDs::C, false);
24112411
CLinkageDecl->setImplicit();
24122412
Parent->addDecl(CLinkageDecl);
24132413
Parent = CLinkageDecl;
@@ -16627,11 +16627,10 @@ void Sema::AddKnownFunctionAttributes(FunctionDecl *FD) {
1662716627
IdentifierInfo *Name = FD->getIdentifier();
1662816628
if (!Name)
1662916629
return;
16630-
if ((!getLangOpts().CPlusPlus &&
16631-
FD->getDeclContext()->isTranslationUnit()) ||
16630+
if ((!getLangOpts().CPlusPlus && FD->getDeclContext()->isTranslationUnit()) ||
1663216631
(isa<LinkageSpecDecl>(FD->getDeclContext()) &&
1663316632
cast<LinkageSpecDecl>(FD->getDeclContext())->getLanguage() ==
16634-
LinkageSpecDecl::lang_c)) {
16633+
LinkageSpecLanguageIDs::C)) {
1663516634
// Okay: this could be a libc/libm/Objective-C function we know
1663616635
// about.
1663716636
} else

clang/lib/Sema/SemaDeclCXX.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16784,11 +16784,11 @@ Decl *Sema::ActOnStartLinkageSpecification(Scope *S, SourceLocation ExternLoc,
1678416784
assert(Lit->isUnevaluated() && "Unexpected string literal kind");
1678516785

1678616786
StringRef Lang = Lit->getString();
16787-
LinkageSpecDecl::LanguageIDs Language;
16787+
LinkageSpecLanguageIDs Language;
1678816788
if (Lang == "C")
16789-
Language = LinkageSpecDecl::lang_c;
16789+
Language = LinkageSpecLanguageIDs::C;
1679016790
else if (Lang == "C++")
16791-
Language = LinkageSpecDecl::lang_cxx;
16791+
Language = LinkageSpecLanguageIDs::CXX;
1679216792
else {
1679316793
Diag(LangStr->getExprLoc(), diag::err_language_linkage_spec_unknown)
1679416794
<< LangStr->getSourceRange();

clang/lib/Sema/SemaModule.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ static void checkModuleImportContext(Sema &S, Module *M,
2828

2929
if (auto *LSD = dyn_cast<LinkageSpecDecl>(DC)) {
3030
switch (LSD->getLanguage()) {
31-
case LinkageSpecDecl::lang_c:
31+
case LinkageSpecLanguageIDs::C:
3232
if (ExternCLoc.isInvalid())
3333
ExternCLoc = LSD->getBeginLoc();
3434
break;
35-
case LinkageSpecDecl::lang_cxx:
35+
case LinkageSpecLanguageIDs::CXX:
3636
break;
3737
}
3838
DC = LSD->getParent();

0 commit comments

Comments
 (0)