[llvm-bugs] [Bug 44235] New: Project xgboost fails to compile when SkipFunctionBodies is specified
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Dec 6 02:56:51 PST 2019
https://bugs.llvm.org/show_bug.cgi?id=44235
Bug ID: 44235
Summary: Project xgboost fails to compile when
SkipFunctionBodies is specified
Product: clang
Version: 9.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: igor.bronstein at gmail.com
CC: blitzrakete at gmail.com, dgregor at apple.com,
erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
richard-llvm at metafoo.co.uk
Created attachment 22905
--> https://bugs.llvm.org/attachment.cgi?id=22905&action=edit
Minimal ASTFrontendAction example
Our tool uses ASTFrontendAction/ASTConsumer to analyze C/C++ projects.
Sometimes we specify `SkipFunctionBodies` to optimize the process. I'm
attaching `clang_tool.cpp`, a minimal example that models what's happening.
Unfortunately `xgboost` fails to compile when `SkipFunctionBodies` is `true`:
```
src/metric/elementwise_metric.cc:7:
In file included from src/metric/elementwise_metric.cu:8:
In file included from include/xgboost/metric.h:16:
include/xgboost/./data.h:204:22: error: unexpected OpenMP directive '#pragma
omp parallel for'
#pragma omp parallel for schedule(static)
^
include/xgboost/./data.h:205:5: error: expected member name or ';' after
declaration specifiers
for (long i = 0; i < batch_size; ++i) { // NOLINT(*)
^
include/xgboost/./data.h:213:22: error: unexpected OpenMP directive '#pragma
omp parallel for'
#pragma omp parallel for schedule(static)
^
include/xgboost/./data.h:214:5: error: expected member name or ';' after
declaration specifiers
for (long i = 0; i < batch_size; ++i) { // NOLINT(*)
^
include/xgboost/./data.h:225:4: error: expected ';' after class
}
^
;
include/xgboost/./data.h:229:22: error: unexpected OpenMP directive '#pragma
omp parallel for'
#pragma omp parallel for schedule(dynamic, 1)
^
include/xgboost/./data.h:230:5: error: expected unqualified-id
for (bst_omp_uint i = 0; i < ncol; ++i) {
^
include/xgboost/./data.h:264:26: error: unknown type name 'SparsePage'; did you
mean 'xgboost::SparsePage'?
inline void Push(const SparsePage &batch) {
^~~~~~~~~~
xgboost::SparsePage
include/xgboost/./data.h:156:7: note: 'xgboost::SparsePage' declared here
class SparsePage {
^
include/xgboost/./data.h:284:26: error: unknown type name 'Inst'
inline void Push(const Inst &inst) {
^
xgboost/include/xgboost/./data.h:298:1: error: extraneous closing brace ('}')
};
^
include/xgboost/./data.h:304:17: error: unknown type name 'SparsePage'; did you
mean 'xgboost::SparsePage'?
virtual const SparsePage& operator*() const = 0;
^~~~~~~~~~
xgboost::SparsePage
include/xgboost/./data.h:156:7: note: 'xgboost::SparsePage' declared here
class SparsePage {
```
There are similar errors for all the source files which include the affected
header file. I have an archive with `xgboost` and its dependencies, but I guess
it exceeds file size limit for this bug tracker.
Anyway I will be glad to provide you with any further information.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20191206/f823f919/attachment.html>
More information about the llvm-bugs
mailing list