Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kay Hicketts committed Apr 10, 2024
1 parent 479c041 commit a59d242
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions clang/lib/Sema/Metafunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1284,15 +1284,15 @@ bool qualified_name_of(APValue &Result, Sema &S, EvalFn Evaluator, QualType Resu

switch (R.getReflection().getKind()) {
case ReflectionValue::RK_type: {
QualType QT = R.getReflectedType(); // inconsitently returns qualified type {fix?}
QualType QT = R.getReflectedType();
return SetAndSucceed(Result, getTypeName(S.Context, Evaluator, QT,
/*emptyIfUnnamed=*/true));
}
case ReflectionValue::RK_declaration: { // works
case ReflectionValue::RK_declaration: {
const ValueDecl *VD = cast<ValueDecl>(R.getReflectedDecl());
return getQualifiedName(Result, S, Evaluator, *VD);
}
case ReflectionValue::RK_template: { // works
case ReflectionValue::RK_template: {
const TemplateDecl *TD = cast<TemplateDecl>(R.getReflectedTemplate().getAsTemplateDecl());
return getQualifiedName(Result, S, Evaluator, *TD);
}
Expand All @@ -1301,7 +1301,7 @@ bool qualified_name_of(APValue &Result, Sema &S, EvalFn Evaluator, QualType Resu
llvm_unreachable("failed to create empty string");
return false;
}
case ReflectionValue::RK_namespace: { // works
case ReflectionValue::RK_namespace: {
const NamespaceDecl *ND = cast<NamespaceDecl>(R.getReflectedNamespace());
return getQualifiedName(Result, S, Evaluator, *ND);
}
Expand Down

0 comments on commit a59d242

Please sign in to comment.