view clang/test/PCH/delayed-template-parsing.cpp @ 222:81f6424ef0e3 llvm-original

LLVM original branch
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 18 Jul 2021 22:10:01 +0900
parents 79ff65ed7e25
children
line wrap: on
line source

// Check any combination of delayed-template-parsing between PCH and TU works.
// RUN: %clang_cc1 %s -emit-pch -o %t.pch
// RUN: %clang_cc1 -fdelayed-template-parsing %s -emit-pch -o %t.delayed.pch
// RUN: %clang_cc1 -DMAIN_FILE -include-pch %t.pch %s
// RUN: %clang_cc1 -DMAIN_FILE -fdelayed-template-parsing -include-pch %t.pch %s
// RUN: %clang_cc1 -DMAIN_FILE -include-pch %t.delayed.pch %s
// RUN: %clang_cc1 -DMAIN_FILE -fdelayed-template-parsing -include-pch %t.delayed.pch %s

#ifndef MAIN_FILE
template <typename T>
T successor(T Value) { return Value + 1; }
#else
int x = successor(42);
#endif