diff --git a/clang/lib/AST/DeclPrinter.cpp b/clang/lib/AST/DeclPrinter.cpp index efe5278fd36de1682d4f48ba4d9556cfbc9a27c0..2c5b47342cef94306b049d50fa63aef1b781adb4 100644 --- a/clang/lib/AST/DeclPrinter.cpp +++ b/clang/lib/AST/DeclPrinter.cpp @@ -1080,13 +1080,15 @@ void DeclPrinter::VisitCXXRecordDecl(CXXRecordDecl *D) { FunctionNameStr += QT; } Out << ' ' + FunctionNameStr; - } else if (!Policy.PrintCanonicalTypes) - if (const auto* TSI = S->getTypeAsWritten()) - if (const auto *TST = - dyn_cast(TSI->getType())) - Args = TST->template_arguments(); - printTemplateArguments( - Args, S->getSpecializedTemplate()->getTemplateParameters()); + } else { + if (!Policy.PrintCanonicalTypes) + if (const auto* TSI = S->getTypeAsWritten()) + if (const auto *TST = + dyn_cast(TSI->getType())) + Args = TST->template_arguments(); + printTemplateArguments( + Args, S->getSpecializedTemplate()->getTemplateParameters()); + } } } diff --git a/clang/lib/Frontend/FrontendOptions.cpp b/clang/lib/Frontend/FrontendOptions.cpp index c9b66a666d26765b0690bb031ccb42856b6e80d8..b4c6b25013ace662294b20f4150a5c1481decdb6 100644 --- a/clang/lib/Frontend/FrontendOptions.cpp +++ b/clang/lib/Frontend/FrontendOptions.cpp @@ -33,6 +33,6 @@ InputKind FrontendOptions::getInputKindForExtension(StringRef Extension) { .Cases("cu", "cuh", Language::CUDA) .Case("hip", Language::HIP) .Cases("ll", "bc", Language::LLVM_IR) - .Case("bsc", Language::BSC) + .Cases("cbs", "hbs", Language::BSC) .Default(Language::Unknown); } diff --git a/clang/test/BSC/Method/Linkage/queue.cbs b/clang/test/BSC/Method/Linkage/queue.cbs index ade2c34591f88383a94a8290e57aef858bdfe86e..d6d9f1d06ef47c1c43d464e530e646ab02a7508a 100644 --- a/clang/test/BSC/Method/Linkage/queue.cbs +++ b/clang/test/BSC/Method/Linkage/queue.cbs @@ -6,5 +6,5 @@ #include "queue.hbs" -// CHECK: define dso_local void @_ZN_ZTS5queueisEmpty(%struct.queue* %this) #0 +// CHECK: define dso_local void @_ZN_ZTS5queueisEmpty void struct queue::isEmpty(struct queue* this) {} diff --git a/clang/test/BSC/Method/Struct/struct_toplevel_func_not_found.cbs b/clang/test/BSC/Method/Struct/struct_toplevel_func_not_found.cbs index 1086c2c0007c1dcf3b6e6a1426ccdeab2132efdf..79a79ffb0c863de02a3f51cb9bc826ba480de7a3 100644 --- a/clang/test/BSC/Method/Struct/struct_toplevel_func_not_found.cbs +++ b/clang/test/BSC/Method/Struct/struct_toplevel_func_not_found.cbs @@ -7,6 +7,6 @@ void struct F::increase(struct F* this) { } int main() { - increase(); // expected-warning {{implicit declaration of function 'increase' is invalid in C99}} + increase(); // expected-error {{use of undeclared identifier 'increase'}} return 0; } \ No newline at end of file