forked from OSchip/llvm-project
Bugfix for predefined expressions in dependent context.
This bug break compilation with precompiled headers and predefined expressions in dependent context. llvm-svn: 219525
This commit is contained in:
parent
a586eb2c70
commit
769562a382
|
@ -457,7 +457,7 @@ PredefinedExpr::PredefinedExpr(SourceLocation L, QualType FNTy, IdentType IT,
|
||||||
Loc(L), Type(IT), FnName(SL) {}
|
Loc(L), Type(IT), FnName(SL) {}
|
||||||
|
|
||||||
StringLiteral *PredefinedExpr::getFunctionName() {
|
StringLiteral *PredefinedExpr::getFunctionName() {
|
||||||
return cast<StringLiteral>(FnName);
|
return cast_or_null<StringLiteral>(FnName);
|
||||||
}
|
}
|
||||||
|
|
||||||
StringRef PredefinedExpr::getIdentTypeName(PredefinedExpr::IdentType IT) {
|
StringRef PredefinedExpr::getIdentTypeName(PredefinedExpr::IdentType IT) {
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
// RUN: %clang_cc1 -std=c++14 %s -triple %itanium_abi_triple -fblocks -emit-llvm -o - | FileCheck %s
|
// RUN: %clang_cc1 -std=c++14 %s -triple %itanium_abi_triple -fblocks -emit-llvm -o - | FileCheck %s
|
||||||
|
// RUN: %clang_cc1 -x c++ -std=c++14 -triple %itanium_abi_triple -fblocks -emit-pch -o %t %s
|
||||||
|
// RUN: %clang_cc1 -x c++ -triple %itanium_abi_triple -std=c++14 -fblocks -include-pch %t %s -emit-llvm -o - | FileCheck %s
|
||||||
|
|
||||||
|
#ifndef HEADER
|
||||||
|
#define HEADER
|
||||||
|
|
||||||
// CHECK-DAG: @__func__._ZN13ClassTemplateIiE21classTemplateFunctionERi = private unnamed_addr constant [22 x i8] c"classTemplateFunction\00"
|
// CHECK-DAG: @__func__._ZN13ClassTemplateIiE21classTemplateFunctionERi = private unnamed_addr constant [22 x i8] c"classTemplateFunction\00"
|
||||||
// CHECK-DAG: @__PRETTY_FUNCTION__._ZN13ClassTemplateIiE21classTemplateFunctionERi = private unnamed_addr constant [69 x i8] c"const auto &ClassTemplate<int>::classTemplateFunction(T &) [T = int]\00"
|
// CHECK-DAG: @__PRETTY_FUNCTION__._ZN13ClassTemplateIiE21classTemplateFunctionERi = private unnamed_addr constant [69 x i8] c"const auto &ClassTemplate<int>::classTemplateFunction(T &) [T = int]\00"
|
||||||
|
@ -81,3 +86,5 @@ int main() {
|
||||||
t.classTemplateFunction(a);
|
t.classTemplateFunction(a);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue