forked from OSchip/llvm-project
Enable -fdelayed-template-parsing by default on Win32.
I had to force -fno-delayed-template-parsing on some Index tests because delayed template parsing will change the output of some tests. llvm-svn: 138942
This commit is contained in:
parent
5f344fff08
commit
0274487d97
|
@ -1782,10 +1782,11 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
options::OPT_fno_borland_extensions, false))
|
||||
CmdArgs.push_back("-fborland-extensions");
|
||||
|
||||
// -fno-delayed-template-parsing is default.
|
||||
// -fno-delayed-template-parsing is default, except for Windows where MSVC STL
|
||||
// needs it.
|
||||
if (Args.hasFlag(options::OPT_fdelayed_template_parsing,
|
||||
options::OPT_fno_delayed_template_parsing,
|
||||
false))
|
||||
getToolChain().getTriple().getOS() == llvm::Triple::Win32))
|
||||
CmdArgs.push_back("-fdelayed-template-parsing");
|
||||
|
||||
// -fgnu-keywords default varies depending on language; only pass if
|
||||
|
|
|
@ -137,7 +137,7 @@ struct X9 : X8 {
|
|||
}
|
||||
};
|
||||
|
||||
// RUN: c-index-test -test-annotate-tokens=%s:13:1:137:1 %s | FileCheck %s
|
||||
// RUN: c-index-test -test-annotate-tokens=%s:13:1:137:1 -fno-delayed-template-parsing %s | FileCheck %s
|
||||
|
||||
// CHECK: Keyword: "using" [14:1 - 14:6] UsingDeclaration=vector[4:12]
|
||||
// CHECK: Identifier: "outer_alias" [14:7 - 14:18] NamespaceRef=outer_alias:10:11
|
||||
|
|
|
@ -8,7 +8,7 @@ void test() {
|
|||
decltype(a) b;
|
||||
}
|
||||
|
||||
// RUN: c-index-test -test-annotate-tokens=%s:1:1:5:1 -std=c++0x %s | FileCheck %s
|
||||
// RUN: c-index-test -test-annotate-tokens=%s:1:1:5:1 -fno-delayed-template-parsing -std=c++0x %s | FileCheck %s
|
||||
// CHECK: Identifier: "args" [3:20 - 3:24] UnexposedExpr=args:2:15
|
||||
// CHECK: Identifier: "Args" [3:38 - 3:42] TypeRef=Args:1:22
|
||||
|
||||
|
|
|
@ -100,7 +100,7 @@ template class Pair<int, int>;
|
|||
template<typename T, typename U>
|
||||
struct SuperPair : Pair<int, int>, Pair<T, U> { };
|
||||
|
||||
// RUN: c-index-test -test-load-source all %s | FileCheck -check-prefix=CHECK-LOAD %s
|
||||
// RUN: c-index-test -test-load-source all -fno-delayed-template-parsing %s | FileCheck -check-prefix=CHECK-LOAD %s
|
||||
// CHECK-LOAD: index-templates.cpp:4:6: FunctionTemplate=f:4:6 Extent=[3:1 - 4:22]
|
||||
// CHECK-LOAD: index-templates.cpp:3:19: TemplateTypeParameter=T:3:19 (Definition) Extent=[3:10 - 3:20]
|
||||
// CHECK-LOAD: index-templates.cpp:3:24: NonTypeTemplateParameter=Value:3:24 (Definition) Extent=[3:22 - 3:29]
|
||||
|
@ -180,7 +180,7 @@ struct SuperPair : Pair<int, int>, Pair<T, U> { };
|
|||
// CHECK-LOAD: index-templates.cpp:101:36: C++ base class specifier=Pair<T, U>:76:8 [access=public isVirtual=false] Extent=[101:36 - 101:46]
|
||||
|
||||
|
||||
// RUN: c-index-test -test-load-source-usrs all %s | FileCheck -check-prefix=CHECK-USRS %s
|
||||
// RUN: c-index-test -test-load-source-usrs all -fno-delayed-template-parsing %s | FileCheck -check-prefix=CHECK-USRS %s
|
||||
// CHECK-USRS: index-templates.cpp c:@FT@>3#T#Nt0.0#t>2#T#Nt1.0f#>t0.22S0_# Extent=[3:1 - 4:22]
|
||||
// CHECK-USRS: index-templates.cpp c:index-templates.cpp@70 Extent=[3:10 - 3:20]
|
||||
// CHECK-USRS: index-templates.cpp c:index-templates.cpp@82 Extent=[3:22 - 3:29]
|
||||
|
|
|
@ -117,7 +117,7 @@ void casts(int *ip) {
|
|||
(void)reinterpret_cast<float *>(ip);
|
||||
}
|
||||
|
||||
// RUN: c-index-test -test-load-source all %s | FileCheck %s
|
||||
// RUN: c-index-test -test-load-source all -fno-delayed-template-parsing %s | FileCheck %s
|
||||
// CHECK: load-stmts.cpp:1:13: TypedefDecl=T:1:13 (Definition) Extent=[1:1 - 1:14]
|
||||
// CHECK: load-stmts.cpp:2:8: StructDecl=X:2:8 (Definition) Extent=[2:1 - 2:23]
|
||||
// CHECK: load-stmts.cpp:2:16: FieldDecl=a:2:16 (Definition) Extent=[2:12 - 2:17]
|
||||
|
|
|
@ -2,8 +2,8 @@ template void foo(int *);
|
|||
|
||||
int main() { }
|
||||
|
||||
// RUN: c-index-test -write-pch %t.pch -x c++-header %S/Inputs/preamble_macro_template.h
|
||||
// RUN: env CINDEXTEST_EDITING=1 c-index-test -test-load-source-reparse 5 local -I %S/Inputs -include %t %s | FileCheck %s
|
||||
// RUN: c-index-test -write-pch %t.pch -fno-delayed-template-parsing -x c++-header %S/Inputs/preamble_macro_template.h
|
||||
// RUN: env CINDEXTEST_EDITING=1 c-index-test -test-load-source-reparse 5 local -fno-delayed-template-parsing -I %S/Inputs -include %t %s | FileCheck %s
|
||||
// CHECK: preamble_macro_template.h:4:6: FunctionDecl=foo:4:6 (Definition) [Specialization of foo:4:6] Extent=[4:1 - 6:2]
|
||||
// CHECK: preamble_macro_template.h:4:13: ParmDecl=p:4:13 (Definition) Extent=[4:10 - 4:14]
|
||||
// CHECK: preamble_macro_template.h:4:16: UnexposedStmt= Extent=[4:16 - 6:2]
|
||||
|
|
Loading…
Reference in New Issue