1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 11:33:24 +02:00
llvm-mirror/test/tools/llvm-cov/Inputs/prevent_false_instantiations.cpp
Igor Kudrin 32058f8126 Reapply "[Coverage] Prevent detection of false instantiations in case of macro expansion."
The root of the problem was that findMainViewFileID(File, Function)
could return some ID for any given file, even though that file
was not the main file for that function.

This patch ensures that the result of this function is conformed
with the result of findMainViewFileID(Function).

This commit reapplies r266436, which was reverted by r266458,
with the .covmapping file serialized in v1 format.

Differential Revision: http://reviews.llvm.org/D18787

llvm-svn: 266620
2016-04-18 15:36:30 +00:00

16 lines
164 B
C++

#include "prevent_false_instantiations.h"
void func1() {
DO_SOMETHING();
}
void func2() {
DO_SOMETHING();
}
int main() {
func1();
func2();
return 0;
}