blob: d2cdd3ea10ac1a1646f48200ce6b2510399e6161 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
//===--- libbuiltins.cc - test input file for iwyu ------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// Library builtins are, like normal builtins, compiled down to an intrinsic,
// but a header still needs to be included for the program to be valid. The math
// library (std::pow, std::round, etc) is a typical example.
// IWYU_ARGS: -I .
#include "tests/cxx/libbuiltins-direct.h"
float kapow(float x) {
// IWYU: std::pow is...*cmath
return std::pow(x, 2.0F);
}
/**** IWYU_SUMMARY
tests/cxx/libbuiltins.cc should add these lines:
#include <cmath>
tests/cxx/libbuiltins.cc should remove these lines:
- #include "tests/cxx/libbuiltins-direct.h" // lines XX-XX
The full include-list for tests/cxx/libbuiltins.cc:
#include <cmath> // for pow
***** IWYU_SUMMARY */
|