Displaying 1 result from an estimated 1 matches for "hassametyp".
Did you mean:
hassametype
2013 Nov 28
2
[LLVMdev] Question about ExprConstant optimization of IR stage
...he real is that this test never executes abort function.
So, I debug source code of clang.
In the 3167 line of ExprConstant.cpp(tools/clang/lib/AST/ExprConstant.cpp),
these codes are
3166: // Don't call function pointers which have been cast to some other type.
3167: if (!Info.Ctx.hasSameType(CalleeType->getPointeeType(), FD->getType()))
3168: return Error(E);
It returns Error(E) . Then, the expression "foo(((~0U)>>1))" is optimized out in the later stage.
Here FD is foo's function pointer, so I think it should not return Error.
Maybe it is bug...