Comments (8)
Thanks for the report.
What version of LLVM do you use for CVise as a run-time library?
I can run the transformation with success:
$ clang_delta/clang_delta --transformation=remove-unused-function tc.C --counter=1 --std=c++17
#include <variant>
#include <vector>
struct A {
std::basic_string<wchar_t> m;
};
struct B {
B(A a);
std::variant<A> m;
};
struct C : B {
using B::B;
};
Can you please attach output of pre-processed source file -E
option for clang?
from cvise.
I'm using LLVM 10, let me see if I can do so easily
from cvise.
C:\path\to\build-cvise\clang_delta\Debug\clang_delta.exe --transformation=remove-unused-function
t.cpp.preprocessed.cpp --counter=1 --std=c++17
Warning: number of transformation instances exceeded
Assertion failed: RWBuf && "Empty RewriteBuffer!", file G:\llvm\cvise-master\clang_delta\Transformation.cpp, line 103
The file: t.cpp.preprocessed.zip
from cvise.
I'm sorry but I can't compile it on Linux:
clang++ x.ii -std=c++17
In file included from .\t.cpp:1:
In file included from c:\path\to\Vs2019\VC\Tools\MSVC\14.24.28314\include\variant:9:
In file included from c:\path\to\Vs2019\VC\Tools\MSVC\14.24.28314\include\yvals.h:9:
In file included from c:\path\to\Vs2019\VC\Tools\MSVC\14.24.28314\include\yvals_core.h:253:
In file included from c:\path\to\Vs2019\VC\Tools\MSVC\14.24.28314\include\vcruntime.h:58:
In file included from c:\path\to\LLVM_10_0_0\lib\clang\10.0.0\include\vadefs.h:18:
c:\path\to\Vs2019\VC\Tools\MSVC\14.24.28314\include\vadefs.h:28:33: error: expected ';' after top level declarator
typedef unsigned __int64 uintptr_t;
^
In file included from .\t.cpp:1:
In file included from c:\path\to\Vs2019\VC\Tools\MSVC\14.24.28314\include\variant:9:
In file included from c:\path\to\Vs2019\VC\Tools\MSVC\14.24.28314\include\yvals.h:9:
In file included from c:\path\to\Vs2019\VC\Tools\MSVC\14.24.28314\include\yvals_core.h:253:
c:\path\to\Vs2019\VC\Tools\MSVC\14.24.28314\include\vcruntime.h:190:29: error: expected ';' after top level declarator
typedef unsigned __int64 size_t;
^
c:\path\to\Vs2019\VC\Tools\MSVC\14.24.28314\include\vcruntime.h:245:42: error: unknown type name 'size_t'
template <typename _CountofType, size_t _SizeOfArray>
^
$ g++ x.ii -std=c++17 -fmax-errors=3
In file included from c:\path\to\LLVM_10_0_0\lib\clang\10.0.0\include\vadefs.h:18,
from c:\path\to\Vs2019\VC\Tools\MSVC\14.24.28314\include\vcruntime.h:58,
from c:\path\to\Vs2019\VC\Tools\MSVC\14.24.28314\include\yvals_core.h:253,
from c:\path\to\Vs2019\VC\Tools\MSVC\14.24.28314\include\yvals.h:9,
from c:\path\to\Vs2019\VC\Tools\MSVC\14.24.28314\include\variant:9,
from .\t.cpp:1:
c:\path\to\Vs2019\VC\Tools\MSVC\14.24.28314\include\vadefs.h:28:34: error: expected initializer before ‘uintptr_t’
In file included from c:\path\to\LLVM_10_0_0\lib\clang\10.0.0\include\vadefs.h:18,
from c:\path\to\Vs2019\VC\Tools\MSVC\14.24.28314\include\vcruntime.h:58,
from c:\path\to\Vs2019\VC\Tools\MSVC\14.24.28314\include\yvals_core.h:253,
from c:\path\to\Vs2019\VC\Tools\MSVC\14.24.28314\include\yvals.h:9,
from c:\path\to\Vs2019\VC\Tools\MSVC\14.24.28314\include\variant:9,
from .\t.cpp:1:
c:\path\to\Vs2019\VC\Tools\MSVC\14.24.28314\include\vadefs.h:112:18: error: expected initializer before ‘__va_start’
In file included from c:\path\to\Vs2019\VC\Tools\MSVC\14.24.28314\include\yvals_core.h:253,
from c:\path\to\Vs2019\VC\Tools\MSVC\14.24.28314\include\yvals.h:9,
from c:\path\to\Vs2019\VC\Tools\MSVC\14.24.28314\include\variant:9,
from .\t.cpp:1:
c:\path\to\Vs2019\VC\Tools\MSVC\14.24.28314\include\vcruntime.h:190:30: error: expected initializer before ‘size_t’
compilation terminated due to -fmax-errors=3.
from cvise.
I guess you can replace __int64 by std::int64_t if you add the include
from cvise.
It will require much more adjustments. You can try it here:
https://godbolt.org/
from cvise.
-fms-extensions
does a lot, however, I seem to always have 32bit-64bit mismatches.
Any tips for me to debug it myself?
from cvise.
Maybe -m32
can help.
Anyway, that's more a LLVM issue than C-Vise
issue. The code is invalid so it's partially understandable.
from cvise.
Related Issues (20)
- Error in ExpressionDetector.cpp when building HOT 1
- Build failure with recent trunk: possibly dangling reference to a temporary HOT 1
- UnIfDefPass has encountered a bug: pass error state: 44 HOT 3
- IfPass has encountered a bug: pass error state: BinaryState: 0-10993 of 10993 instances HOT 6
- ClangBinarySearchPass::replace-function-def-with-decl has encountered a bug: pass error state: BinaryState: 0-1350 of 2701 instances HOT 1
- ClexPass::rm-toks-1 has encountered a bug: pass got stuck state: 50000 HOT 5
- Infinite loop in clang_delta replace-function-def-with-decl HOT 19
- error: no type named 'Designator' in 'clang::DesignatedInitExpr' HOT 1
- RFC for improvement: (1) add support for GCC compilation. (2) This may be a red herring, but we may want to eliminate lines from the end, NOT fromt he begining. HOT 8
- Allow folders/directories in test cases HOT 8
- New release for LLVM 16 support? HOT 3
- remove-unused-outer-class is very restrictive on what it removes HOT 1
- cvise stops intermittently HOT 7
- Parallelism doesn't do much HOT 9
- When are shortcuts taken into account? HOT 3
- clang_delta: […] clang::Expr::ClassifyImpl(…) const: Assertion `isLValue()' failed. HOT 15
- cvise: running only the "light" transformations HOT 2
- ability to use /bin/sh for --commands HOT 2
- Release new version HOT 1
- Understanding C-Vise Performance with multiple cores and Comparison with C-Reduce HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cvise.